Browse Source
Merge pull request #6481 from nextcloud/occ-app-install-enable
add enable flag to occ app:install
pull/8545/merge
Morris Jobke
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
13 additions and
0 deletions
-
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; |
|
|
|
} |
|
|
|
} |