diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2021-04-07 10:09:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-07 10:09:48 +0200 |
commit | b9907df702d37ea72bd2a28fca3d50f413207339 (patch) | |
tree | e775f1b396b21b4cfd03a029ae18388ae43a6983 /core/Command | |
parent | c391e8692b11f961c1cbdcb1fbb9c97a748a39b3 (diff) | |
parent | 1f9372109759c4ca51bd015cd47e07bb1b830aa8 (diff) | |
download | nextcloud-server-b9907df702d37ea72bd2a28fca3d50f413207339.tar.gz nextcloud-server-b9907df702d37ea72bd2a28fca3d50f413207339.zip |
Merge pull request #26252 from Maxopoly/master
Add force option to app install command
Diffstat (limited to 'core/Command')
-rw-r--r-- | core/Command/App/Install.php | 9 |
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; |