diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-02-18 17:47:53 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-02-18 17:51:18 +0100 |
commit | d8fd31f50ff55f7f334a2b9e58a82570e82ec28d (patch) | |
tree | 48e3902cb9f67a9e1c77043b984a60f51b926cd0 /src/nix | |
parent | 9af10b753c8a636f828b148fc3a9aecd1c0067fa (diff) |
Disable the progress bar if $TERM == dumb or unset
Fixes #3363.
Diffstat (limited to 'src/nix')
-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 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() |