disable progress bar if the output is redirected (patch from VMiklos <vmiklos@frugalware.org>)

This commit is contained in:
Aurelien Foret 2006-03-01 07:27:06 +00:00
parent b868e02967
commit ce4c043805

View file

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