Defer plugin installs from october:install until October is installed (#4156)
Fixes #4155. Credit to @filipac.
This commit is contained in:
parent
44cc080769
commit
6e798079ca
|
|
@ -71,16 +71,27 @@ class OctoberInstall extends Command
|
||||||
$this->setupAdminUser();
|
$this->setupAdminUser();
|
||||||
$this->setupCommonValues();
|
$this->setupCommonValues();
|
||||||
|
|
||||||
|
$chosenToInstall = [];
|
||||||
|
|
||||||
if ($this->confirm('Configure advanced options?', false)) {
|
if ($this->confirm('Configure advanced options?', false)) {
|
||||||
$this->setupEncryptionKey();
|
$this->setupEncryptionKey();
|
||||||
$this->setupAdvancedValues();
|
$this->setupAdvancedValues();
|
||||||
$this->askToInstallPlugins();
|
$chosenToInstall = $this->askToInstallPlugins();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->setupEncryptionKey(true);
|
$this->setupEncryptionKey(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setupMigrateDatabase();
|
$this->setupMigrateDatabase();
|
||||||
|
|
||||||
|
foreach ($chosenToInstall as $pluginCode) {
|
||||||
|
$this->output->writeln('<info>Installing plugin ' . $pluginCode . '</info>');
|
||||||
|
$this->callSilent('plugin:install', [
|
||||||
|
'name' => $pluginCode
|
||||||
|
]);
|
||||||
|
$this->output->writeln('<info>' . $pluginCode . ' installed successfully.</info>');
|
||||||
|
}
|
||||||
|
|
||||||
$this->displayOutro();
|
$this->displayOutro();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -120,20 +131,14 @@ class OctoberInstall extends Command
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function askToInstallPlugins() {
|
protected function askToInstallPlugins() {
|
||||||
|
$chosenToInstall = [];
|
||||||
if ($this->confirm('Install the October.Drivers plugin?', false)) {
|
if ($this->confirm('Install the October.Drivers plugin?', false)) {
|
||||||
$this->output->writeln('<info>Installing plugin October.Drivers</info>');
|
$chosenToInstall[] = 'October.Drivers';
|
||||||
$this->callSilent('plugin:install', [
|
|
||||||
'name' => 'October.Drivers'
|
|
||||||
]);
|
|
||||||
$this->output->writeln('<info>October.Drivers installed successfully.</info>');
|
|
||||||
}
|
}
|
||||||
if($this->confirm('Install the Rainlab.Builder plugin?', false)) {
|
if ($this->confirm('Install the Rainlab.Builder plugin?', false)) {
|
||||||
$this->output->writeln('<info>Installing plugin Rainlab.Builder</info>');
|
$chosenToInstall[] = 'Rainlab.Builder';
|
||||||
$this->callSilent('plugin:install', [
|
|
||||||
'name' => 'Rainlab.Builder'
|
|
||||||
]);
|
|
||||||
$this->output->writeln('<info>Rainlab.Builder installed successfully.</info>');
|
|
||||||
}
|
}
|
||||||
|
return $chosenToInstall;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue