fix(debug): catch nil value on Trace

relates to #2238
This commit is contained in:
Jan De Dobbeleer 2022-05-08 07:17:34 +02:00
parent e3b2d86b06
commit b5dab586d3

View file

@ -297,7 +297,7 @@ func (env *ShellEnvironment) downloadConfig(location string) error {
} }
func (env *ShellEnvironment) Trace(start time.Time, function string, args ...string) { func (env *ShellEnvironment) Trace(start time.Time, function string, args ...string) {
if !env.CmdFlags.Debug { if env.CmdFlags != nil && !env.CmdFlags.Debug {
return return
} }
elapsed := time.Since(start) elapsed := time.Since(start)