summaryrefslogtreecommitdiff
path: root/cmdline/apt-cache.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:53:17 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:53:17 +0000
commita9a5908db9fa6ee108fb23f516b422aa9ca47120 (patch)
treea069ca3df83362346d5080f41593426428c9093f /cmdline/apt-cache.cc
parente5a1f2ff4cd1300364c7c644958583a8af704173 (diff)
Fixed bug#34944: apt-get should not print progress on n...
Author: jgg Date: 1999-03-27 01:30:38 GMT Fixed bug#34944: apt-get should not print progress on non-tty
Diffstat (limited to 'cmdline/apt-cache.cc')
-rw-r--r--cmdline/apt-cache.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index a235ad9a1..31247f205 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-cache.cc,v 1.30 1999/03/18 04:52:51 jgg Exp $
+// $Id: apt-cache.cc,v 1.31 1999/03/27 01:30:38 jgg Exp $
/* ######################################################################
apt-cache - Manages the cache files
@@ -675,6 +675,10 @@ int main(int argc,const char *argv[])
CmdL.FileSize() == 0)
return ShowHelp(CmdL);
+ // Deal with stdout not being a tty
+ if (ttyname(STDOUT_FILENO) == 0 && _config->FindI("quiet",0) < 1)
+ _config->Set("quiet","1");
+
if (CmdL.DispatchArg(CmdsA,false) == false && _error->PendingError() == false)
{
// Open the cache file