From 7d431a7bd620e8355eaa28a8b12f501c03f025bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20L=2E=20Hansen?= Date: Tue, 30 Aug 2022 17:02:18 -0700 Subject: [PATCH] Ensure --quiet flag is honored The code to disable logging ran before command line flags are parsed. Moved them around. Fixes #45 --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index d5832fb..2212b8f 100644 --- a/main.go +++ b/main.go @@ -64,13 +64,13 @@ func main() { } } + utils.ApplyFlags(cliFlags, flagMappings, c, appOptions, backendOptions) + if appOptions.Quiet { log.SetFlags(0) log.SetOutput(ioutil.Discard) } - utils.ApplyFlags(cliFlags, flagMappings, c, appOptions, backendOptions) - if c.IsSet("credential") { appOptions.EnableBasicAuth = true }