From 6b4ee29202a0e03f7d9e251b6e19c74f9a31354c Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Thu, 3 Sep 2015 08:03:03 +0200 Subject: [PATCH] Make install command available only if Flarum is not installed --- flarum/flarum | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/flarum/flarum b/flarum/flarum index 9914cf0..fc3ecca 100644 --- a/flarum/flarum +++ b/flarum/flarum @@ -12,6 +12,7 @@ use Flarum\Console\GenerateExtensionCommand; use Flarum\Console\UpgradeCommand; +use Flarum\Core; use Flarum\Install\Console\InstallCommand; use Symfony\Component\Console\Application; @@ -19,7 +20,11 @@ $app = require_once __DIR__.'/bootstrap.php'; $console = new Application('Flarum', $app::VERSION); -$console->add(new InstallCommand($app)); +if (!Core::isInstalled()) { + $app->register(new \Flarum\Install\InstallServiceProvider($app)); + $console->add(new InstallCommand($app)); +} + $console->add(new UpgradeCommand($app)); $console->add(new GenerateExtensionCommand($app));