diff --git a/modules/system/console/OctoberInstall.php b/modules/system/console/OctoberInstall.php index 415cae64d..204b71d4e 100644 --- a/modules/system/console/OctoberInstall.php +++ b/modules/system/console/OctoberInstall.php @@ -71,16 +71,27 @@ class OctoberInstall extends Command $this->setupAdminUser(); $this->setupCommonValues(); + $chosenToInstall = []; + if ($this->confirm('Configure advanced options?', false)) { $this->setupEncryptionKey(); $this->setupAdvancedValues(); - $this->askToInstallPlugins(); + $chosenToInstall = $this->askToInstallPlugins(); } else { $this->setupEncryptionKey(true); } $this->setupMigrateDatabase(); + + foreach ($chosenToInstall as $pluginCode) { + $this->output->writeln('Installing plugin ' . $pluginCode . ''); + $this->callSilent('plugin:install', [ + 'name' => $pluginCode + ]); + $this->output->writeln('' . $pluginCode . ' installed successfully.'); + } + $this->displayOutro(); } @@ -120,20 +131,14 @@ class OctoberInstall extends Command } protected function askToInstallPlugins() { + $chosenToInstall = []; if ($this->confirm('Install the October.Drivers plugin?', false)) { - $this->output->writeln('Installing plugin October.Drivers'); - $this->callSilent('plugin:install', [ - 'name' => 'October.Drivers' - ]); - $this->output->writeln('October.Drivers installed successfully.'); + $chosenToInstall[] = 'October.Drivers'; } - if($this->confirm('Install the Rainlab.Builder plugin?', false)) { - $this->output->writeln('Installing plugin Rainlab.Builder'); - $this->callSilent('plugin:install', [ - 'name' => 'Rainlab.Builder' - ]); - $this->output->writeln('Rainlab.Builder installed successfully.'); + if ($this->confirm('Install the Rainlab.Builder plugin?', false)) { + $chosenToInstall[] = 'Rainlab.Builder'; } + return $chosenToInstall; } //