Skip to content

Commit

Permalink
Default "dumb" terminals to no color
Browse files Browse the repository at this point in the history
  • Loading branch information
maddyblue committed Mar 18, 2016
1 parent a681486 commit 3e6149a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion termlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func NewLog() *Log {
TimeFmt: defaultTimeFmt,
}
l.enabled[""] = true
if !terminal.IsTerminal(int(os.Stdout.Fd())) {
if !terminal.IsTerminal(int(os.Stdout.Fd())) || os.Getenv("TERM") == "dumb" {
l.Color(false)
}
return l
Expand Down

0 comments on commit 3e6149a

Please sign in to comment.