Merge pull request #864 from ceriath/patch-1

Remove colored output on windows
This commit is contained in:
David Bariod
2018-12-10 09:02:29 +01:00
committed by GitHub
2 changed files with 8 additions and 2 deletions
+6 -1
View File
@@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"os"
"runtime"
"sort"
"strings"
"testing"
@@ -443,7 +444,11 @@ func TestTextFormatterIsColored(t *testing.T) {
os.Setenv("CLICOLOR_FORCE", val.clicolorForceVal)
}
res := tf.isColored()
assert.Equal(subT, val.expectedResult, res)
if runtime.GOOS == "windows" && !tf.ForceColors && !val.clicolorForceIsSet {
assert.Equal(subT, false, res)
} else {
assert.Equal(subT, val.expectedResult, res)
}
})
}
}