mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 09:04:41 +04:00
Revert "Don't use color if NO_COLOR environment variable is set"
This reverts commit 1bf9ff7493.
This commit is contained in:
parent
df919e6ab5
commit
c75d8939f8
1 changed files with 0 additions and 3 deletions
|
|
@ -48,9 +48,6 @@ def use_color(setting):
|
||||||
if setting not in COLOR_CHOICES:
|
if setting not in COLOR_CHOICES:
|
||||||
raise InvalidColorSetting(setting)
|
raise InvalidColorSetting(setting)
|
||||||
|
|
||||||
if 'NO_COLOR' in os.environ:
|
|
||||||
return False
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
setting == 'always' or
|
setting == 'always' or
|
||||||
(setting == 'auto' and sys.stdout.isatty() and terminal_supports_color)
|
(setting == 'auto' and sys.stdout.isatty() and terminal_supports_color)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue