aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-02-18 17:47:53 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-02-18 17:47:53 +0100
commit8f9dcfc67175992dbfe8e5cfb10b8716dcad89a8 (patch)
tree696c61f05021a0da547f378245d30bd9b0bfe545
parent5921ca89f9cc6247830e92a71f7db3f1fe0c193b (diff)
Disable the progress bar if $TERM == dumb or unset
Fixes #3363.
-rw-r--r--src/nix/progress-bar.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nix/progress-bar.cc b/src/nix/progress-bar.cc
index c445f31cc..26631416c 100644
--- a/src/nix/progress-bar.cc
+++ b/src/nix/progress-bar.cc
@@ -446,7 +446,9 @@ public:
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()