From a940a109dfa278460acd851b8268375af5185da8 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Sun, 8 May 2022 08:17:48 +0200 Subject: [PATCH] fix(debug): init CmdFlags correctly relates #2238 --- src/environment/shell.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/environment/shell.go b/src/environment/shell.go index 135ef1dc..73654855 100644 --- a/src/environment/shell.go +++ b/src/environment/shell.go @@ -229,12 +229,12 @@ type ShellEnvironment struct { func (env *ShellEnvironment) Init() { defer env.Trace(time.Now(), "Init") - if env.CmdFlags.Debug { - log.SetOutput(&env.logBuilder) - } if env.CmdFlags == nil { env.CmdFlags = &Flags{} } + if env.CmdFlags.Debug { + log.SetOutput(&env.logBuilder) + } env.fileCache = &fileCache{} env.fileCache.Init(env.CachePath()) env.resolveConfigPath()