From c340d1851242e691e7e0baad18a662d6c7a62bc8 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 26 Jun 2010 19:04:20 +0200 Subject: do not override the user set quiet setting even if the target is not a tty --- cmdline/apt-cache.cc | 2 +- cmdline/apt-cdrom.cc | 2 +- cmdline/apt-get.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index a4ec63eed..a5b3141d7 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1868,7 +1868,7 @@ int main(int argc,const char *argv[]) /*{{{*/ } // Deal with stdout not being a tty - if (isatty(STDOUT_FILENO) && _config->FindI("quiet",0) < 1) + if (!isatty(STDOUT_FILENO) && _config->FindI("quiet", -1) == -1) _config->Set("quiet","1"); // if (_config->FindB("APT::Cache::Generate",true) == false) diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc index da2ffa390..d1268edf9 100644 --- a/cmdline/apt-cdrom.cc +++ b/cmdline/apt-cdrom.cc @@ -266,7 +266,7 @@ int main(int argc,const char *argv[]) /*{{{*/ return ShowHelp(); // Deal with stdout not being a tty - if (isatty(STDOUT_FILENO) && _config->FindI("quiet",0) < 1) + if (isatty(STDOUT_FILENO) && _config->FindI("quiet", -1) == -1) _config->Set("quiet","1"); // Match the operation diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 605eedb0f..e3477b6db 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2899,7 +2899,7 @@ int main(int argc,const char *argv[]) /*{{{*/ } // Deal with stdout not being a tty - if (!isatty(STDOUT_FILENO) && _config->FindI("quiet",0) < 1) + if (!isatty(STDOUT_FILENO) && _config->FindI("quiet", -1) == -1) _config->Set("quiet","1"); // Setup the output streams -- cgit v1.2.3