Add stderr to support piped nocolor output

This commit is contained in:
Harshavardhana
2015-05-27 15:40:41 -07:00
parent 274dae59f3
commit 8422db004c
+1 -1
View File
@@ -78,7 +78,7 @@ var (
currThemeName = func() string {
theme := GetDefaultThemeName()
// if not a TTY disable color
if !isatty(os.Stdout.Fd()) {
if !isatty(os.Stdout.Fd()) || !isatty(os.Stderr.Fd()) {
return "nocolor"
}
return theme