mirror of
https://github.com/flarum/core.git
synced 2025-07-26 03:01:22 +02:00
Delete config.php if installation fails
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user