1
0
mirror of https://github.com/minio/mc.git synced 2025-11-12 01:02:26 +03:00

Add stderr to support piped nocolor output

This commit is contained in:
Harshavardhana
2015-05-27 15:39:52 -07:00
parent 274dae59f3
commit 8422db004c

View File

@@ -78,7 +78,7 @@ var (
currThemeName = func() string { currThemeName = func() string {
theme := GetDefaultThemeName() theme := GetDefaultThemeName()
// if not a TTY disable color // if not a TTY disable color
if !isatty(os.Stdout.Fd()) { if !isatty(os.Stdout.Fd()) || !isatty(os.Stderr.Fd()) {
return "nocolor" return "nocolor"
} }
return theme return theme