From 69b2cb5ea67eec5f171490c7a5f4aa568718e39c Mon Sep 17 00:00:00 2001 From: Edgar Geier Date: Tue, 23 Jul 2019 17:38:29 +0200 Subject: [PATCH] Revert "Simplify NO_COLOR check" This reverts commit e9ff1be96c831a1f77708b782dca19fe6d7250da. --- pre_commit/color.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pre_commit/color.py b/pre_commit/color.py index 2ede410a..102639ad 100644 --- a/pre_commit/color.py +++ b/pre_commit/color.py @@ -48,7 +48,7 @@ def use_color(setting): if setting not in COLOR_CHOICES: raise InvalidColorSetting(setting) - if os.environ.get('NO_COLOR'): + if 'NO_COLOR' in os.environ and os.environ['NO_COLOR']: return False return (