summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2021-04-20 17:49:10 +0200
committerGitHub <noreply@github.com>2021-04-20 17:49:10 +0200
commite9308534296176f75597f99196db656d00a7fedc (patch)
tree46070ed0bf6bbb0b200232905676fbce9aa7c1aa /core
parentc580dd5fe99f6daf4051ab8b99842ffe800bf17f (diff)
parent0f64b7cd0d01e218d12c2d1c9b900c78c2105a0b (diff)
downloadnextcloud-server-e9308534296176f75597f99196db656d00a7fedc.tar.gz
nextcloud-server-e9308534296176f75597f99196db656d00a7fedc.zip
Merge pull request #26607 from nextcloud/backport/26252/stable21
[stable21] Add force option to app install command
Diffstat (limited to 'core')
-rw-r--r--core/Command/App/Install.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/Command/App/Install.php b/core/Command/App/Install.php
index 296d559a97b..fcb0571308f 100644
--- a/core/Command/App/Install.php
+++ b/core/Command/App/Install.php
@@ -50,11 +50,18 @@ class Install extends Command {
InputOption::VALUE_NONE,
'don\'t enable the app afterwards'
)
+ ->addOption(
+ 'force',
+ 'f',
+ InputOption::VALUE_NONE,
+ 'install the app regardless of the Nextcloud version requirement'
+ )
;
}
protected function execute(InputInterface $input, OutputInterface $output): int {
$appId = $input->getArgument('app-id');
+ $forceEnable = (bool) $input->getOption('force');
if (\OC_App::getAppPath($appId)) {
$output->writeln($appId . ' already installed');
@@ -65,7 +72,7 @@ class Install extends Command {
/** @var Installer $installer */
$installer = \OC::$server->query(Installer::class);
$installer->downloadApp($appId);
- $result = $installer->installApp($appId);
+ $result = $installer->installApp($appId, $forceEnable);
} catch (\Exception $e) {
$output->writeln('Error: ' . $e->getMessage());
return 1;