diff options
-rw-r--r-- | cmdline/apt-cache.cc | 6 | ||||
-rw-r--r-- | cmdline/apt-cdrom.cc | 6 | ||||
-rw-r--r-- | cmdline/apt-get.cc | 6 |
3 files changed, 15 insertions, 3 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 diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc index 85d2fa3e8..459e4a48d 100644 --- a/cmdline/apt-cdrom.cc +++ b/cmdline/apt-cdrom.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-cdrom.cc,v 1.17 1999/01/30 02:12:53 jgg Exp $ +// $Id: apt-cdrom.cc,v 1.18 1999/03/27 01:30:38 jgg Exp $ /* ###################################################################### APT CDROM - Tool for handling APT's CDROM database. @@ -1025,6 +1025,10 @@ int main(int argc,const char *argv[]) if (_config->FindB("help") == true || CmdL.FileSize() == 0) return ShowHelp(); + + // Deal with stdout not being a tty + if (ttyname(STDOUT_FILENO) == 0 && _config->FindI("quiet",0) < 1) + _config->Set("quiet","1"); // Match the operation CmdL.DispatchArg(Cmds); diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index d7580c2f3..81c350dfa 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-get.cc,v 1.45 1999/03/17 19:45:05 jgg Exp $ +// $Id: apt-get.cc,v 1.46 1999/03/27 01:30:38 jgg Exp $ /* ###################################################################### apt-get - Cover for dpkg @@ -1208,6 +1208,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"); + // Setup the output streams c0out.rdbuf(cout.rdbuf()); c1out.rdbuf(cout.rdbuf()); |