- changed status to resolved
Check whether stdout is a TTY before doing colored output
Issue #396
resolved
Version 5.18 introduced colored output with an explicit option do disable it.
When processing monit's output with a script this means you have the escape sequences mangled in the output if not using the -B option. But this option does not exist in versions < 5.18.
How about using isatty(STDOUT_FILENO)
to check whether the output is actually written to a TTY, just like ls
for example.
Comments (1)
-
repo owner - Log in to comment
resolved in upcoming monit 5.18.1