Преглед изворни кода

print all messages if the application is in an interactive run

David Kalnischkies пре 16 година
родитељ
комит
65beb5720f
3 измењених фајлова са 15 додато и 21 уклоњено
  1. 5 7
      cmdline/apt-cache.cc
  2. 5 7
      cmdline/apt-cdrom.cc
  3. 5 7
      cmdline/apt-get.cc

+ 5 - 7
cmdline/apt-cache.cc

@@ -1876,13 +1876,11 @@ int main(int argc,const char *argv[])					/*{{{*/
       CmdL.DispatchArg(CmdsB);
 
    // Print any errors or warnings found during parsing
-   if (_error->empty() == false)
-   {
-      bool Errors = _error->PendingError();
+   bool const Errors = _error->PendingError();
+   if (_config->FindI("quiet",0) > 0)
       _error->DumpErrors();
-      return Errors == true?100:0;
-   }
-          
-   return 0;
+   else
+      _error->DumpErrors(GlobalError::DEBUG);
+   return Errors == true ? 100 : 0;
 }
 									/*}}}*/

+ 5 - 7
cmdline/apt-cdrom.cc

@@ -273,13 +273,11 @@ int main(int argc,const char *argv[])					/*{{{*/
    CmdL.DispatchArg(Cmds);
 
    // Print any errors or warnings found during parsing
-   if (_error->empty() == false)
-   {
-      bool Errors = _error->PendingError();
+   bool const Errors = _error->PendingError();
+   if (_config->FindI("quiet",0) > 0)
       _error->DumpErrors();
-      return Errors == true?100:0;
-   }
-   
-   return 0;
+   else
+      _error->DumpErrors(GlobalError::DEBUG);
+   return Errors == true ? 100 : 0;
 }
 									/*}}}*/

+ 5 - 7
cmdline/apt-get.cc

@@ -2920,13 +2920,11 @@ int main(int argc,const char *argv[])					/*{{{*/
    CmdL.DispatchArg(Cmds);
 
    // Print any errors or warnings found during parsing
-   if (_error->empty() == false)
-   {
-      bool Errors = _error->PendingError();
+   bool const Errors = _error->PendingError();
+   if (_config->FindI("quiet",0) > 0)
       _error->DumpErrors();
-      return Errors == true?100:0;
-   }
-   
-   return 0;   
+   else
+      _error->DumpErrors(GlobalError::DEBUG);
+   return Errors == true ? 100 : 0;
 }
 									/*}}}*/