Delete config.php if installation fails

This commit is contained in:
Toby Zerner 2015-08-26 17:46:49 +09:30
parent f331f1d07d
commit f3d45902fc

View File

@ -20,6 +20,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Output\OutputInterface;
use Exception;
class InstallCommand extends Command
{
@ -85,6 +86,7 @@ class InstallCommand extends Command
protected function install()
{
try {
$this->storeConfiguration();
$this->runMigrations();
@ -103,6 +105,11 @@ class InstallCommand extends Command
$this->createAdminUser();
$this->enableBundledExtensions();
} catch (Exception $e) {
@unlink(base_path('../config.php'));
throw $e;
}
}
protected function storeConfiguration()