print all messages if the application is in an interactive run
[apt.git] / cmdline / apt-cache.cc
index 2332a0f13d544eba37b898699a07afc0ef16052b..a4ec63eeda0a65544410fdfadf9004819fc610cd 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;
 }
                                                                        /*}}}*/