Fix chartify temp directory cleanup - track output directories for proper cleanup

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-08-23 03:36:30 +00:00
co-authored by yxxhero
parent 53ee477e20
commit e06c185667
4 changed files with 14 additions and 59 deletions
-9
View File
@@ -68,14 +68,6 @@ func NewRootCmd(globalConfig *config.GlobalOptions) (*cobra.Command, error) {
}
logger = helmexec.NewLogger(logOut, logLevel)
globalConfig.SetLogger(logger)
// Clean up old temporary files if enabled
if globalConfig.CleanupTempFiles {
if err := app.CleanupTempFiles(logger); err != nil {
logger.Warnf("Failed to cleanup temporary files: %v", err)
}
}
return nil
},
}
@@ -149,7 +141,6 @@ The name of a release can be used as a label: "--selector name=myrelease"`)
fs.BoolVar(&globalOptions.EnableLiveOutput, "enable-live-output", globalOptions.EnableLiveOutput, `Show live output from the Helm binary Stdout/Stderr into Helmfile own Stdout/Stderr.
It only applies for the Helm CLI commands, Stdout/Stderr for Hooks are still displayed only when it's execution finishes.`)
fs.BoolVarP(&globalOptions.Interactive, "interactive", "i", false, "Request confirmation before attempting to modify clusters")
fs.BoolVar(&globalOptions.CleanupTempFiles, "cleanup-temp-files", true, "Clean up temporary files and directories from previous runs on startup")
// avoid 'pflag: help requested' error (#251)
fs.BoolP("help", "h", false, "help for helmfile")
}