list returns 1 if no applications are installed
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 16 Feb 2015 11:42:00 +0000 (12:42 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 16 Feb 2015 12:06:47 +0000 (13:06 +0100)
Change-Id: I2f01135054a35434e4bf2937904d8fb5413bcf76
Reviewed-on: http://gerrit.tine20.com/customers/1660
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Setup/Frontend/Cli.php

index 33691bf..c6fdd63 100644 (file)
@@ -57,7 +57,7 @@ class Setup_Frontend_Cli
         } elseif(isset($_opts->uninstall)) {
             $this->_uninstall($_opts);
         } elseif(isset($_opts->list)) {
-            $this->_listInstalled();
+            $result = $this->_listInstalled();
         } elseif(isset($_opts->sync_accounts_from_ldap)) {
             $this->_importAccounts($_opts);
         } elseif(isset($_opts->sync_passwords_from_ldap)) {
@@ -264,7 +264,7 @@ class Setup_Frontend_Cli
         }
         
         $controller->uninstallApplications($applications->name);
-
+        
         echo "Successfully uninstalled " . count($applications) . " applications.\n";
     }
 
@@ -277,13 +277,15 @@ class Setup_Frontend_Cli
             $applications = Tinebase_Application::getInstance()->getApplications(NULL, 'id');
         } catch (Zend_Db_Statement_Exception $e) {
             echo "No applications installed\n";
-            return;
+            return 1;
         }
         
         echo "Currently installed applications:\n";
         foreach($applications as $application) {
             echo "* $application\n";
         }
+        
+        return 0;
     }
     
     /**