From dcd309ffb035a4a0f1ba1f9b1c93777607f30124 Mon Sep 17 00:00:00 2001 From: Filip Iulian Pacurar Date: Fri, 23 Nov 2018 08:24:45 +0200 Subject: [PATCH] Add option to install developer plugins from the october:install command (#2974) Credit to @filipac. Initially requested in https://github.com/octobercms/october/pull/2694 --- modules/system/console/OctoberInstall.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/modules/system/console/OctoberInstall.php b/modules/system/console/OctoberInstall.php index feb39002c..415cae64d 100644 --- a/modules/system/console/OctoberInstall.php +++ b/modules/system/console/OctoberInstall.php @@ -74,6 +74,7 @@ class OctoberInstall extends Command if ($this->confirm('Configure advanced options?', false)) { $this->setupEncryptionKey(); $this->setupAdvancedValues(); + $this->askToInstallPlugins(); } else { $this->setupEncryptionKey(true); @@ -118,6 +119,23 @@ class OctoberInstall extends Command $this->writeToConfig('app', ['debug' => $debug]); } + protected function askToInstallPlugins() { + 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.'); + } + 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.'); + } + } + // // Encryption key //