aboutsummaryrefslogtreecommitdiff
path: root/src/nix
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:51:18 +0100
commitd8fd31f50ff55f7f334a2b9e58a82570e82ec28d (patch)
tree48e3902cb9f67a9e1c77043b984a60f51b926cd0 /src/nix
parent9af10b753c8a636f828b148fc3a9aecd1c0067fa (diff)
Disable the progress bar if $TERM == dumb or unset
Fixes #3363.
Diffstat (limited to 'src/nix')
-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()