diff --git a/pre-commit.py b/pre-commit.py index c5ed63ac443d..ae432e82251f 100755 --- a/pre-commit.py +++ b/pre-commit.py @@ -2,6 +2,7 @@ import argparse import enum +import os import subprocess import sys from typing import List @@ -93,7 +94,7 @@ def check(name: str, suffix: str, cmd: str, changed_files: List[str], no_color: "--no-color", action="store_true", help="disable colored output", - default=not sys.stdout.isatty(), + default=not sys.stdout.isatty() or os.getenv("TERM") == "dumb", ) args = parser.parse_args()