From d8fd31f50ff55f7f334a2b9e58a82570e82ec28d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 18 Feb 2020 17:47:53 +0100 Subject: [PATCH] Disable the progress bar if $TERM == dumb or unset Fixes #3363. --- src/nix/progress-bar.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nix/progress-bar.cc b/src/nix/progress-bar.cc index c445f31ccf3..26631416cc2 100644 --- a/src/nix/progress-bar.cc +++ b/src/nix/progress-bar.cc @@ -446,7 +446,9 @@ class ProgressBar : public Logger void startProgressBar(bool printBuildLogs) { - logger = new ProgressBar(printBuildLogs, isatty(STDERR_FILENO)); + logger = new ProgressBar( + printBuildLogs, + isatty(STDERR_FILENO) && getEnv("TERM").value_or("dumb") != "dumb"); } void stopProgressBar()