gst-inspect: Disable colors when piped

This follows what git and systemd tools would do.
This commit is contained in:
Nicolas Dufresne 2018-12-19 16:55:57 -05:00
parent 8f136e8d9f
commit 01ecc85983

View file

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