globals: setGlobals() - quiet, debug, json, noColor for both app and command specific.

This commit is contained in:
Harshavardhana
2015-11-25 15:40:20 -08:00
parent 9fe3b00394
commit 97090aee0c
+4 -4
View File
@@ -72,9 +72,9 @@ func setGlobals(quiet, debug, json, noColor bool) {
// Set global states. NOTE: It is deliberately kept monolithic to ensure we dont miss out any flags.
func setGlobalsFromContext(ctx *cli.Context) {
quiet := ctx.Bool("quiet")
debug := ctx.Bool("debug")
json := ctx.Bool("json")
noColor := ctx.Bool("no-color")
quiet := ctx.Bool("quiet") || ctx.GlobalBool("quiet")
debug := ctx.Bool("debug") || ctx.GlobalBool("debug")
json := ctx.Bool("json") || ctx.GlobalBool("json")
noColor := ctx.Bool("no-color") || ctx.GlobalBool("no-color")
setGlobals(quiet, debug, json, noColor)
}