Merge: console: don't color output when stdout is not a TTY (by default)
authorJean Privat <jean@pryen.org>
Fri, 6 Apr 2018 02:04:35 +0000 (22:04 -0400)
committerJean Privat <jean@pryen.org>
Fri, 6 Apr 2018 02:04:35 +0000 (22:04 -0400)
Change the behavior of the `console` package to ignore color commands like `Text::green` when stdout is not a TTY. You can override this behavior by setting `force_console_colors = true`.

I made this change to color the output of nitpm, however, it can be useful to other tools to support stdout redirection by default.

Pull-Request: #2626


Trivial merge