Skip to content

Commit

Permalink
Print os.Args prior to exiting. (#102)
Browse files Browse the repository at this point in the history
Signed-off-by: Ernst von Oelsen <[email protected]>
  • Loading branch information
ernstvonoelsen authored Jan 31, 2025
1 parent 69654ca commit 4993c73
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/app/execontext.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const (

type ExecutionContext struct {
Out *Output
Args []string
cleanupHandlers []func()
}

Expand Down Expand Up @@ -98,7 +99,9 @@ func (ref *ExecutionContext) exit(exitCode int) {
ref.Out.Info("exit", OutVars{
"code": exitCode,
"version": v.Current(),
"location": fsutil.ExeDir()})
"location": fsutil.ExeDir(),
"args": os.Args})

}

ShowCommunityInfo(ref.Out.OutputFormat)
Expand All @@ -116,7 +119,8 @@ func NewExecutionContext(
}

ref := &ExecutionContext{
Out: NewOutput(cmdName, quiet, outputFormat, chs),
Out: NewOutput(cmdName, quiet, outputFormat, chs),
Args: os.Args,
}

return ref
Expand Down

0 comments on commit 4993c73

Please sign in to comment.