Delete config.php if installation fails

This commit is contained in:
Toby Zerner 2015-08-26 17:46:49 +09:30
parent dea759d5b8
commit 3e804ca0b5

View File

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