From f9929052a04832b3e5bf6c0daf21719a27057c16 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Sun, 9 Jun 2013 09:27:13 +0100 Subject: 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. --- cli/cli_dump.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli') 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 } -- cgit v1.2.3