Skip to content

Commit

Permalink
Ensure --quiet flag is honored
Browse files Browse the repository at this point in the history
The code to disable logging ran before command line flags are parsed.
Moved them around.

Fixes #45
  • Loading branch information
sorenisanerd committed Aug 31, 2022
1 parent 94e5873 commit 7d431a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 7d431a7

Please sign in to comment.