summaryrefslogtreecommitdiffstats
path: root/core/Command/App
diff options
context:
space:
mode:
authorMaxopoly <max@dermax.org>2021-03-22 23:49:13 +0100
committerMaxopoly <max@dermax.org>2021-03-22 23:49:13 +0100
commit1f9372109759c4ca51bd015cd47e07bb1b830aa8 (patch)
treedaee9e21090cbcbbb34ae7dfeb9f851c65cd4e14 /core/Command/App
parent1c074e76028b65c4158097a35254fbf7ebe8749c (diff)
downloadnextcloud-server-1f9372109759c4ca51bd015cd47e07bb1b830aa8.tar.gz
nextcloud-server-1f9372109759c4ca51bd015cd47e07bb1b830aa8.zip
Add force option to app install command
Signed-off-by: Maxopoly <max@dermax.org>
Diffstat (limited to 'core/Command/App')
-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;