add enable flag to occ app:install (fix #5834)
Signed-off-by: Klaus Herberth <klaus@jsxc.org>
This commit is contained in:
parent
452e96e2a7
commit
323eb2e8ba
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue