do not override the user set quiet setting even if the target is not a tty
authorDavid Kalnischkies <kalnischkies@gmail.com>
Sat, 26 Jun 2010 17:04:20 +0000 (19:04 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Sat, 26 Jun 2010 17:04:20 +0000 (19:04 +0200)
cmdline/apt-cache.cc
cmdline/apt-cdrom.cc
cmdline/apt-get.cc

index a4ec63e..a5b3141 100644 (file)
@@ -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)
index da2ffa3..d1268ed 100644 (file)
@@ -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
index 605eedb..e3477b6 100644 (file)
@@ -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