diff --git a/dvc/env.py b/dvc/env.py index 299ab711c..0ac4e46e8 100644 --- a/dvc/env.py +++ b/dvc/env.py @@ -6,3 +6,4 @@ DVCLIVE_PATH = "DVCLIVE_PATH" DVCLIVE_SUMMARY = "DVCLIVE_SUMMARY" DVCLIVE_HTML = "DVCLIVE_HTML" DVCLIVE_RESUME = "DVCLIVE_RESUME" +DVC_IGNORE_ISATTY = "DVC_IGNORE_ISATTY" diff --git a/dvc/progress.py b/dvc/progress.py index 1345f1ddd..fcfb1ddf8 100644 --- a/dvc/progress.py +++ b/dvc/progress.py @@ -6,6 +6,7 @@ from threading import RLock from tqdm import tqdm +from dvc.env import DVC_IGNORE_ISATTY from dvc.utils import env2bool logger = logging.getLogger(__name__) @@ -77,7 +78,7 @@ class Tqdm(tqdm): # auto-disable based on TTY if ( not disable - and not env2bool("DVC_IGNORE_ISATTY") + and not env2bool(DVC_IGNORE_ISATTY) and hasattr(file, "isatty") ): disable = not file.isatty()