Skip to content

Commit 0390348

Browse files
committed
progress: keep color enabled with NO_COLOR empty
The NO_COLOR specification says that color should be disabled if NO_COLOR is set *and not empty*. Signed-off-by: Justin Chadwell <[email protected]>
1 parent 9b28f40 commit 0390348

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

util/progress/progressui/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var colorError aec.ANSI
1414

1515
func init() {
1616
// As recommended on https://no-color.org/
17-
if _, ok := os.LookupEnv("NO_COLOR"); ok {
17+
if v := os.Getenv("NO_COLOR"); v != "" {
1818
// nil values will result in no ANSI color codes being emitted.
1919
return
2020
} else if runtime.GOOS == "windows" {

0 commit comments

Comments
 (0)