Skip to content

Commit

Permalink
Disable the progress bar if $TERM == dumb or unset
Browse files Browse the repository at this point in the history
Fixes NixOS#3363.

(cherry picked from commit d8fd31f)
(cherry picked from commit 2f0122b)
  • Loading branch information
edolstra authored and dtzWill committed Feb 18, 2020
1 parent 75e0aa0 commit 8de75c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/nix/progress-bar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,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()
Expand Down

0 comments on commit 8de75c2

Please sign in to comment.