When going through a pipe, color is already turned off. This allows
color to be restored with the --no-pipe option. If color is not desired
with --no-pipe, then --nocolor should also be specified.
CONFIG['termWidth'] = term_width - 1
# Guess color output
- if (CONFIG['color'] == -1 and (not sys.stdout.isatty() or
- os.getenv("NOCOLOR") in ("yes", "true")) or CONFIG['color'] == 0):
+ if (CONFIG['color'] == -1 and os.getenv("NOCOLOR") in ("yes", "true") or
+ CONFIG['color'] == 0):
pp.output.nocolor()
if CONFIG['piping']: