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 1277bea..1921fe4 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