]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Command/InstallCommand.php
Re-enable test on doctrine command
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Command / InstallCommand.php
index 808baaf68ec7257270d620d1028cfa763ce59377..8b702c958b1cea05a44a318f7525aa7e0dd3ee38 100644 (file)
@@ -96,10 +96,10 @@ class InstallCommand extends ContainerAwareCommand
 
         if (!$fulfilled) {
             throw new \RuntimeException('Some system requirements are not fulfilled. Please check output messages and fix them.');
-        } else {
-            $this->defaultOutput->writeln('<info>Success! Your system can run Wallabag properly.</info>');
         }
 
+        $this->defaultOutput->writeln('<info>Success! Your system can run Wallabag properly.</info>');
+
         $this->defaultOutput->writeln('');
 
         return $this;
@@ -283,10 +283,16 @@ class InstallCommand extends ContainerAwareCommand
         try {
             $schemaManager = $connection->getSchemaManager();
         } catch (\Exception $exception) {
+            // mysql & sqlite
             if (false !== strpos($exception->getMessage(), sprintf("Unknown database '%s'", $databaseName))) {
                 return false;
             }
 
+            // pgsql
+            if (false !== strpos($exception->getMessage(), sprintf('database "%s" does not exist', $databaseName))) {
+                return false;
+            }
+
             throw $exception;
         }