Skip to content

Commit decf62f

Browse files
authored
Merge pull request #55831 from nextcloud/backport/55395/stable31
[stable31] fix(Apps): fix install command check on existing apps
2 parents 0c2f059 + 382d4c3 commit decf62f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/Command/App/Install.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
namespace OC\Core\Command\App;
1010

1111
use OC\Installer;
12+
use OCP\App\AppPathNotFoundException;
1213
use OCP\App\IAppManager;
1314
use Symfony\Component\Console\Command\Command;
1415
use Symfony\Component\Console\Input\InputArgument;
@@ -58,9 +59,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
5859
$appId = $input->getArgument('app-id');
5960
$forceEnable = (bool)$input->getOption('force');
6061

61-
if ($this->appManager->isInstalled($appId)) {
62+
try {
63+
$this->appManager->getAppPath($appId);
6264
$output->writeln($appId . ' already installed');
6365
return 1;
66+
} catch (AppPathNotFoundException) {
6467
}
6568

6669
try {

0 commit comments

Comments
 (0)