gst-inspect: Disable colors when piped
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 19 Dec 2018 21:55:57 +0000 (16:55 -0500)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 19 Dec 2018 21:55:57 +0000 (16:55 -0500)
This follows what git and systemd tools would do.

tools/gst-inspect.c

index 1277bea8e9ba66a5e8b09649469c79cd6ff01825..1921fe4574e680149f18fee9536c96415df80187 100644 (file)
@@ -2031,6 +2031,8 @@ main (int argc, char *argv[])
 #ifdef G_OS_UNIX
   if (isatty (STDOUT_FILENO)) {
     redirect_stdout ();
+  } else {
+    colored_output = FALSE;
   }
 #endif