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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user