From ce4c043805865f745e6aa8762455a2f9b19b25cd Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Wed, 1 Mar 2006 07:27:06 +0000 Subject: disable progress bar if the output is redirected (patch from VMiklos ) --- src/pacman/pacman.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 73f8c637..18422e39 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -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); -- cgit v1.2.3-70-g09d2