Disable the progress bar if $TERM == dumb or unset

Fixes #3363.

(cherry picked from commit d8fd31f50ff55f7f334a2b9e58a82570e82ec28d)
This commit is contained in:
Eelco Dolstra 2020-02-18 17:47:53 +01:00
parent db3d3a5618
commit 2f0122b23c
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -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()