Skip to content

Commit db4ef8c

Browse files
authored
Merge pull request #5508 from pucheGit/douga-termstyledetection
Adjusted Terminal Style Detection
2 parents 7419078 + 58825d4 commit db4ef8c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/minikube/out/out.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,10 @@ func wantsColor(fd uintptr) bool {
161161
}
162162

163163
term := os.Getenv("TERM")
164+
colorTerm := os.Getenv("COLORTERM")
164165
// Example: term-256color
165-
if !strings.Contains(term, "color") {
166-
glog.Infof("TERM=%s, which probably does not support color", term)
166+
if !strings.Contains(term, "color") && !strings.Contains(colorTerm, "truecolor") && !strings.Contains(colorTerm, "24bit") && !strings.Contains(colorTerm, "yes") {
167+
glog.Infof("TERM=%s,COLORTERM=%s, which probably does not support color", term, colorTerm)
167168
return false
168169
}
169170

0 commit comments

Comments
 (0)