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
+2 -1
View File
@@ -4,6 +4,7 @@ import (
"bytes"
"fmt"
"os"
"runtime"
"sort"
"strings"
"sync"
@@ -90,7 +91,7 @@ func (f *TextFormatter) init(entry *Entry) {
}
func (f *TextFormatter) isColored() bool {
isColored := f.ForceColors || f.isTerminal
isColored := f.ForceColors || (f.isTerminal && (runtime.GOOS != "windows"))
if f.EnvironmentOverrideColors {
if force, ok := os.LookupEnv("CLICOLOR_FORCE"); ok && force != "0" {