print all messages if the application is in an interactive run
authorDavid Kalnischkies <kalnischkies@gmail.com>
Fri, 25 Jun 2010 18:11:11 +0000 (20:11 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Fri, 25 Jun 2010 18:11:11 +0000 (20:11 +0200)
cmdline/apt-cache.cc
cmdline/apt-cdrom.cc
cmdline/apt-get.cc

index 2332a0f..a4ec63e 100644 (file)
@@ -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;
 }
                                                                        /*}}}*/
index 8b9eaca..da2ffa3 100644 (file)
@@ -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;
 }
                                                                        /*}}}*/
index 6a7d7a4..605eedb 100644 (file)
@@ -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;
 }
                                                                        /*}}}*/