Skip to content

Commit

Permalink
Merge pull request #3 from mjibson/master
Browse files Browse the repository at this point in the history
Default "dumb" terminals to no color
  • Loading branch information
cortesi committed Mar 20, 2016
2 parents a681486 + 3e6149a commit d0239e2
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 d0239e2

Please sign in to comment.