Skip to content

Commit 03891c8

Browse files
authored
Merge pull request #32 from oliverpool/patch-1
Fix handling of the IS_NO_COLOR env variable
2 parents 9fde238 + 71568e0 commit 03891c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

is.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ type I struct {
7474
var noColorFlag bool
7575

7676
func init() {
77-
colorEnv := os.Getenv("IS_NO_COLOR") != "false"
78-
flag.BoolVar(&noColorFlag, "nocolor", colorEnv, "turns off colors")
77+
envNoColor := os.Getenv("IS_NO_COLOR") == "true"
78+
flag.BoolVar(&noColorFlag, "nocolor", envNoColor, "turns off colors")
7979
}
8080

8181
// New makes a new testing helper using the specified

0 commit comments

Comments
 (0)