diff --git a/framework/core/src/Install/Console/InstallCommand.php b/framework/core/src/Install/Console/InstallCommand.php index c609754db..e88025497 100644 --- a/framework/core/src/Install/Console/InstallCommand.php +++ b/framework/core/src/Install/Console/InstallCommand.php @@ -1,4 +1,4 @@ -storeConfiguration(); + try { + $this->storeConfiguration(); - $this->runMigrations(); + $this->runMigrations(); - $this->writeSettings(); + $this->writeSettings(); - $this->container->register('Flarum\Core\CoreServiceProvider'); + $this->container->register('Flarum\Core\CoreServiceProvider'); - $resolver = $this->container->make('Illuminate\Database\ConnectionResolverInterface'); - Model::setConnectionResolver($resolver); - Model::setEventDispatcher($this->container->make('events')); + $resolver = $this->container->make('Illuminate\Database\ConnectionResolverInterface'); + Model::setConnectionResolver($resolver); + Model::setEventDispatcher($this->container->make('events')); - $this->seedGroups(); - $this->seedPermissions(); + $this->seedGroups(); + $this->seedPermissions(); - $this->createAdminUser(); + $this->createAdminUser(); - $this->enableBundledExtensions(); + $this->enableBundledExtensions(); + } catch (Exception $e) { + @unlink(base_path('../config.php')); + + throw $e; + } } protected function storeConfiguration()