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) }