Provide an environ to override isatty checking.

For those times when you are piping through less or sending data
over a FIFO.

(Conditional upon review)
This commit is contained in:
Chris Dent 2015-08-10 21:44:34 +01:00
parent 2b0df54fb8
commit 239b49797f

@ -12,6 +12,8 @@
# under the License.
"""Utility functions grab bag."""
import os
import colorama
@ -59,7 +61,7 @@ def get_colorizer(stream):
Only if stream is a tty .
"""
if stream.isatty():
if stream.isatty() or os.environ.get('GABBI_FORCE_COLOR', False):
colorama.init()
return _colorize
else: