Skip to content

Commit

Permalink
remap keep tmp file
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Okhlopkov <[email protected]>
  • Loading branch information
Pavel Okhlopkov committed Dec 5, 2024
1 parent 6e89b47 commit 70b156d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/app/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func (cfg *Config) SetupGlobalVars() {

setIfNotEmpty(&DebugHttpServerAddr, cfg.DebugConfig.HTTPServerAddress)
setIfNotEmpty(&DebugKeepTmpFilesVar, cfg.DebugConfig.KeepTemporaryFiles)
setIfNotEmpty(&DebugKeepTmpFiles, cfg.DebugConfig.KeepTemporaryFiles == "yes")
setIfNotEmpty(&DebugKeepTmpFiles, cfg.DebugConfig.KeepTemporaryFiles == "true" || cfg.DebugConfig.KeepTemporaryFiles == "yes")
setIfNotEmpty(&DebugKubernetesAPI, cfg.DebugConfig.KubernetesAPI)
setIfNotEmpty(&DebugUnixSocket, cfg.DebugConfig.UnixSocket)

Expand Down
6 changes: 1 addition & 5 deletions pkg/app/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ func DefineDebugFlags(kpApp *kingpin.Application, cmd *kingpin.CmdClause) {

cmd.Flag("debug-keep-tmp-files", "set to yes to disable cleanup of temporary files").
Hidden().
Default(DebugKeepTmpFilesVar).Action(func(_ *kingpin.ParseContext) error {
DebugKeepTmpFiles = DebugKeepTmpFilesVar == "yes"

return nil
}).
Default(DebugKeepTmpFilesVar).
StringVar(&DebugKeepTmpFilesVar)

cmd.Flag("debug-kubernetes-api", "enable client-go debug messages").
Expand Down

0 comments on commit 70b156d

Please sign in to comment.