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

Fixes #3363.
This commit is contained in:
Eelco Dolstra 2020-02-18 17:47:53 +01:00
parent 9af10b753c
commit d8fd31f50f
No known key found for this signature in database
GPG Key ID: 8170B4726D7198DE
1 changed files with 3 additions and 1 deletions

View File

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