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)
  • Loading branch information
edolstra committed Feb 18, 2020
1 parent db3d3a5 commit 2f0122b
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 2f0122b

Please sign in to comment.