respect ForceColor and environment variables over OS check

This commit is contained in:
Ceriath
2018-12-09 21:47:44 +01:00
parent f1b98e4006
commit d962013756
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -444,7 +444,7 @@ func TestTextFormatterIsColored(t *testing.T) {
os.Setenv("CLICOLOR_FORCE", val.clicolorForceVal)
}
res := tf.isColored()
if runtime.GOOS == "windows" {
if runtime.GOOS == "windows" && !tf.ForceColors && !val.clicolorForceIsSet {
assert.Equal(subT, false, res)
} else {
assert.Equal(subT, val.expectedResult, res)