disable progress bar if the output is redirected (patch from VMiklos <vmiklos@frugalware.org>)
This commit is contained in:
parent
b868e02967
commit
ce4c043805
1 changed files with 4 additions and 0 deletions
|
@ -88,6 +88,10 @@ int main(int argc, char *argv[])
|
|||
config = config_new();
|
||||
config->op = PM_OP_MAIN;
|
||||
config->debug |= PM_LOG_WARNING;
|
||||
/* disable progressbar if the output is redirected */
|
||||
if(!isatty(1)) {
|
||||
config->noprogressbar = 1;
|
||||
}
|
||||
|
||||
/* parse the command line */
|
||||
ret = parseargs(argc, argv);
|
||||
|
|
Loading…
Add table
Reference in a new issue