X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FCommand%2FInstallCommand.php;h=ac7583ea7f7d74770a9fca4761dd6ba207fa9f71;hb=46bbd8d321e6a00131f0e6ed96fa6f3d693b3678;hp=a528c3098275a6ec59a22d60a61acbfccfa994d5;hpb=0bf99bb144561525a34a50315b95efd6f543fe35;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index a528c309..ac7583ea 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php @@ -283,6 +283,17 @@ class InstallCommand extends ContainerAwareCommand throw $exception; } + // custom verification for sqlite, since `getListDatabasesSQL` doesn't work for sqlite + if ('sqlite' == $schemaManager->getDatabasePlatform()->getName()) { + $params = $this->getContainer()->get('doctrine.dbal.default_connection')->getParams(); + + if (isset($params['path']) && file_exists($params['path'])) { + return true; + } + + return false; + } + return in_array($databaseName, $schemaManager->listDatabases()); }