diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-02-18T16·47+0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-02-18T17·36+0100 |
commit | 2f0122b23cb0b9e15bcda81ef188190ada899b1a (patch) | |
tree | a37d1c130bdc2d30444a65928491823da58cbb4c | |
parent | db3d3a56184a34d7fa46f493e1ecd3ff0ff10453 (diff) |
Disable the progress bar if $TERM == dumb or unset
Fixes #3363. (cherry picked from commit d8fd31f50ff55f7f334a2b9e58a82570e82ec28d)
-rw-r--r-- | src/nix/progress-bar.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nix/progress-bar.cc b/src/nix/progress-bar.cc index 661966733d36..28199c917fcd 100644 --- a/src/nix/progress-bar.cc +++ b/src/nix/progress-bar.cc @@ -439,7 +439,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() |