nickstenning / honcho

Honcho: a python clone of Foreman. For managing Procfile-based applications.
http://pypi.python.org/pypi/honcho
MIT License
1.59k stars 145 forks source link

Don't add ANSI color sequences on non-TTY outputs #187

Closed unterwegi closed 7 years ago

unterwegi commented 7 years ago

This adds a check to the Printer class so that it only adds ANSI color codes to an output line when the output object passes a isatty() check.

This is advisable in situations where honcho's output is not written to a terminal (e.g. redirected to a file, started as a systemd service, started in a detached docker container, ...) and therefore would only pollute the output target with non-interpreted ANSI escape sequences.

nickstenning commented 7 years ago

:+1: Thanks for the patch.

nickstenning commented 7 years ago

This change is now out in v1.0.1 :tada: