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.
  • Loading branch information
edolstra committed Feb 18, 2020
1 parent 9af10b7 commit d8fd31f
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 @@ -446,7 +446,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 d8fd31f

Please sign in to comment.