Ensure --quiet flag is honored
The code to disable logging ran before command line flags are parsed. Moved them around. Fixes #45
This commit is contained in:
parent
94e587399d
commit
7d431a7bd6
4
main.go
4
main.go
|
@ -64,13 +64,13 @@ func main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
utils.ApplyFlags(cliFlags, flagMappings, c, appOptions, backendOptions)
|
||||||
|
|
||||||
if appOptions.Quiet {
|
if appOptions.Quiet {
|
||||||
log.SetFlags(0)
|
log.SetFlags(0)
|
||||||
log.SetOutput(ioutil.Discard)
|
log.SetOutput(ioutil.Discard)
|
||||||
}
|
}
|
||||||
|
|
||||||
utils.ApplyFlags(cliFlags, flagMappings, c, appOptions, backendOptions)
|
|
||||||
|
|
||||||
if c.IsSet("credential") {
|
if c.IsSet("credential") {
|
||||||
appOptions.EnableBasicAuth = true
|
appOptions.EnableBasicAuth = true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue