From 97090aee0c10f4282ee12db07279848016a04d1f Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Wed, 25 Nov 2015 15:40:02 -0800 Subject: [PATCH] globals: setGlobals() - quiet, debug, json, noColor for both app and command specific. --- globals.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/globals.go b/globals.go index 9ff1b26b..40cab303 100644 --- a/globals.go +++ b/globals.go @@ -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) }