summaryrefslogtreecommitdiffstats
path: root/core/Command
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-02-26 17:49:37 +0100
committerGitHub <noreply@github.com>2018-02-26 17:49:37 +0100
commit67a76b00e8e05dbed5acaa8f9dc6a7d28065e6aa (patch)
treea8e340a8577b34240f70bc3fc127a390f96fd866 /core/Command
parent950e7e0467d9a486ea3f0987f38c787d3e16daec (diff)
parent84f6477ce551a9fe69150acaf0158651c644cf58 (diff)
downloadnextcloud-server-67a76b00e8e05dbed5acaa8f9dc6a7d28065e6aa.tar.gz
nextcloud-server-67a76b00e8e05dbed5acaa8f9dc6a7d28065e6aa.zip
Merge pull request #6481 from nextcloud/occ-app-install-enable
add enable flag to occ app:install
Diffstat (limited to 'core/Command')
-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..4432a1f40ac 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(
+ 'keep-disabled',
+ null,
+ InputOption::VALUE_NONE,
+ 'don\'t enable the app afterwards'
+ )
;
}
@@ -66,6 +73,12 @@ class Install extends Command {
$output->writeln($appId . ' installed');
+ if (!$input->getOption('keep-disabled')) {
+ $appClass = new \OC_App();
+ $appClass->enable($appId);
+ $output->writeln($appId . ' enabled');
+ }
+
return 0;
}
}