Просмотр исходного кода

do not override the user set quiet setting even if the target is not a tty

David Kalnischkies лет назад: 16
Родитель
Сommit
c340d18512
3 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      cmdline/apt-cache.cc
  2. 1 1
      cmdline/apt-cdrom.cc
  3. 1 1
      cmdline/apt-get.cc

+ 1 - 1
cmdline/apt-cache.cc

@@ -1868,7 +1868,7 @@ int main(int argc,const char *argv[])					/*{{{*/
    }
    }
    
    
    // Deal with stdout not being a tty
    // 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");
       _config->Set("quiet","1");
 
 
 //       if (_config->FindB("APT::Cache::Generate",true) == false)
 //       if (_config->FindB("APT::Cache::Generate",true) == false)

+ 1 - 1
cmdline/apt-cdrom.cc

@@ -266,7 +266,7 @@ int main(int argc,const char *argv[])					/*{{{*/
       return ShowHelp();
       return ShowHelp();
 
 
    // Deal with stdout not being a tty
    // 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");
       _config->Set("quiet","1");
    
    
    // Match the operation
    // Match the operation

+ 1 - 1
cmdline/apt-get.cc

@@ -2899,7 +2899,7 @@ int main(int argc,const char *argv[])					/*{{{*/
    }
    }
 
 
    // Deal with stdout not being a tty
    // 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");
       _config->Set("quiet","1");
 
 
    // Setup the output streams
    // Setup the output streams