Skip to content

Commit 4993c73

Browse files
Print os.Args prior to exiting. (#102)
Signed-off-by: Ernst von Oelsen <ernst.vonoelsen@tngtech.com>
1 parent 69654ca commit 4993c73

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/app/execontext.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const (
2323

2424
type ExecutionContext struct {
2525
Out *Output
26+
Args []string
2627
cleanupHandlers []func()
2728
}
2829

@@ -98,7 +99,9 @@ func (ref *ExecutionContext) exit(exitCode int) {
9899
ref.Out.Info("exit", OutVars{
99100
"code": exitCode,
100101
"version": v.Current(),
101-
"location": fsutil.ExeDir()})
102+
"location": fsutil.ExeDir(),
103+
"args": os.Args})
104+
102105
}
103106

104107
ShowCommunityInfo(ref.Out.OutputFormat)
@@ -116,7 +119,8 @@ func NewExecutionContext(
116119
}
117120

118121
ref := &ExecutionContext{
119-
Out: NewOutput(cmdName, quiet, outputFormat, chs),
122+
Out: NewOutput(cmdName, quiet, outputFormat, chs),
123+
Args: os.Args,
120124
}
121125

122126
return ref

0 commit comments

Comments
 (0)