mirror of
https://github.com/flarum/framework.git
synced 2025-02-22 18:15:26 +08:00
Delete config.php if installation fails
This commit is contained in:
parent
dea759d5b8
commit
3e804ca0b5
@ -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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user