diff options
author | José Fonseca <jfonseca@vmware.com> | 2013-06-09 09:27:13 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2013-06-09 09:27:51 +0100 |
commit | f9929052a04832b3e5bf6c0daf21719a27057c16 (patch) | |
tree | 8fe5ce2c00dd6bf3610378d12132057d6c9c08b2 /cli | |
parent | ddee48a95f1dbbc343496cb065af8c061963083e (diff) |
retrace: Don't output color when stdout is not a tty (issue #143).
To prevent tools that consume its output having to deal with ANSI
escape codes.
Diffstat (limited to 'cli')
-rw-r--r-- | cli/cli_dump.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/cli_dump.cpp b/cli/cli_dump.cpp index e30f6cc2..10dcd61d 100644 --- a/cli/cli_dump.cpp +++ b/cli/cli_dump.cpp @@ -158,7 +158,7 @@ command(int argc, char *argv[]) #ifdef _WIN32 color = COLOR_OPTION_ALWAYS; #else - color = isatty(1) ? COLOR_OPTION_ALWAYS : COLOR_OPTION_NEVER; + color = isatty(STDERR_FILENO) ? COLOR_OPTION_ALWAYS : COLOR_OPTION_NEVER; pipepager(); #endif } |