aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command/App/Install.php
diff options
context:
space:
mode:
authorsualko <klaus@jsxc.org>2017-09-13 12:30:03 +0200
committerMorris Jobke <hey@morrisjobke.de>2018-02-26 16:34:52 +0100
commit323eb2e8baa556ad52ba1202e992a982433a1f1b (patch)
tree717455fadc278b9501a2763d2caa909c4b2df362 /core/Command/App/Install.php
parent452e96e2a7e191589c4a0e3f6a6f5bda0b347d1c (diff)
downloadnextcloud-server-323eb2e8baa556ad52ba1202e992a982433a1f1b.tar.gz
nextcloud-server-323eb2e8baa556ad52ba1202e992a982433a1f1b.zip
add enable flag to occ app:install (fix #5834)
Signed-off-by: Klaus Herberth <klaus@jsxc.org>
Diffstat (limited to 'core/Command/App/Install.php')
-rw-r--r--core/Command/App/Install.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/Command/App/Install.php b/core/Command/App/Install.php
index 8f530975be9..95c8d2ec755 100644
--- a/core/Command/App/Install.php
+++ b/core/Command/App/Install.php
@@ -25,6 +25,7 @@ namespace OC\Core\Command\App;
use OC\Installer;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
@@ -39,6 +40,12 @@ class Install extends Command {
InputArgument::REQUIRED,
'install the specified app'
)
+ ->addOption(
+ 'enable',
+ null,
+ InputOption::VALUE_NONE,
+ 'enable the app afterwards'
+ )
;
}
@@ -66,6 +73,12 @@ class Install extends Command {
$output->writeln($appId . ' installed');
+ if ($input->getOption('enable')) {
+ $appClass = new \OC_App();
+ $appClass->enable($appId);
+ $output->writeln($appId . ' enabled');
+ }
+
return 0;
}
}