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)
commit9660b1025cbca22cd53264229b34abe0cfa78dae
treeada9d272cea8c07ff4590348bf3f6ad426745f5e
parentb1d652326fd9a29bb16d80b0ec416da46f48c7fe
parentd5434bbe45859bae58ba499545cbd66f1747a8ed
Merge: console: don't color output when stdout is not a TTY (by default)

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