Permalink
Browse files

Honor NO_COLOR environment variable.

  • Loading branch information...
Brant Watson
Brant Watson committed Feb 12, 2018
1 parent c7707ce commit 0092b0af2a1506eee2b0ca028b1cf51f78fc91fa
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/log_color/colors.py
@@ -51,6 +51,10 @@ def color_supported(force_seq=None):
if force_seq is False or force_seq is True:
return force_seq
# Honor NO_COLOR environment variable:
if os.environ.get('NO_COLOR', None):
return False
# Attempt simple autodetection
if (
(hasattr(sys.stderr, "isatty") and sys.stderr.isatty()) or

0 comments on commit 0092b0a

Please sign in to comment.