mirror of
https://github.com/flarum/flarum.git
synced 2025-11-27 00:00:38 -05:00
Make install command available only if Flarum is not installed
This commit is contained in:
parent
680e8b53d6
commit
6b4ee29202
@ -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));
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user