Skip to content
Snippets Groups Projects
Unverified Commit 67a76b00 authored by Morris Jobke's avatar Morris Jobke Committed by GitHub
Browse files

Merge pull request #6481 from nextcloud/occ-app-install-enable

add enable flag to occ app:install
parents 950e7e04 84f6477c
Branches
Tags
No related merge requests found
...@@ -25,6 +25,7 @@ namespace OC\Core\Command\App; ...@@ -25,6 +25,7 @@ namespace OC\Core\Command\App;
use OC\Installer; use OC\Installer;
use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
...@@ -39,6 +40,12 @@ class Install extends Command { ...@@ -39,6 +40,12 @@ class Install extends Command {
InputArgument::REQUIRED, InputArgument::REQUIRED,
'install the specified app' '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 { ...@@ -66,6 +73,12 @@ class Install extends Command {
$output->writeln($appId . ' installed'); $output->writeln($appId . ' installed');
if (!$input->getOption('keep-disabled')) {
$appClass = new \OC_App();
$appClass->enable($appId);
$output->writeln($appId . ' enabled');
}
return 0; return 0;
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment