diff --git a/console.go b/console.go index 917d7492..921e4b33 100644 --- a/console.go +++ b/console.go @@ -319,10 +319,10 @@ func needsQuote(s string) bool { return false } -// colorize returns the string s wrapped in ANSI code c, unless disabled is true. +// colorize returns the string s wrapped in ANSI code c, unless disabled is true or c is 0. func colorize(s interface{}, c int, disabled bool) string { e := os.Getenv("NO_COLOR") - if e != "" { + if e != "" || c == 0 { disabled = true }