From b5dab586d3ce0cee78672f784a3225f63ba1e83a Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer <2492783+JanDeDobbeleer@users.noreply.github.com> Date: Sun, 8 May 2022 07:17:34 +0200 Subject: [PATCH] fix(debug): catch nil value on Trace relates to #2238 --- src/environment/shell.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/environment/shell.go b/src/environment/shell.go index f3867775..69f9c683 100644 --- a/src/environment/shell.go +++ b/src/environment/shell.go @@ -297,7 +297,7 @@ func (env *ShellEnvironment) downloadConfig(location string) error { } func (env *ShellEnvironment) Trace(start time.Time, function string, args ...string) { - if !env.CmdFlags.Debug { + if env.CmdFlags != nil && !env.CmdFlags.Debug { return } elapsed := time.Since(start)