Skip to content

Commit 75f7c2e

Browse files
authored
Merge pull request moby#3556 from jedevc/no-color-empty-string
progress: keep color enabled with NO_COLOR empty
2 parents 9b28f40 + 0390348 commit 75f7c2e

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)