allocate writeFile and backupFile just once
This commit is contained in:
committed by
Jonathon Anderson
parent
983a359c00
commit
0bbab7ac3c
@@ -91,8 +91,8 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
wwlog.Debug("Found multifile comment, new filename %s", filenameFromTemplate[0][1])
|
||||
if foundFileComment {
|
||||
if !Quiet {
|
||||
wwlog.Info("backupFile: %v", backupFile)
|
||||
wwlog.Info("writeFile: %v", writeFile)
|
||||
wwlog.Info("backupFile: %v", *backupFile)
|
||||
wwlog.Info("writeFile: %v", *writeFile)
|
||||
wwlog.Info("Filename: %s", destFileName)
|
||||
}
|
||||
wwlog.Output("%s", outBuffer.String())
|
||||
@@ -105,8 +105,8 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
}
|
||||
if !Quiet {
|
||||
wwlog.Info("backupFile: %v", backupFile)
|
||||
wwlog.Info("writeFile: %v", writeFile)
|
||||
wwlog.Info("backupFile: %v", *backupFile)
|
||||
wwlog.Info("writeFile: %v", *writeFile)
|
||||
wwlog.Info("Filename: %s", destFileName)
|
||||
}
|
||||
wwlog.Output("%s", outBuffer.String())
|
||||
|
||||
Reference in New Issue
Block a user