Skip to content

Commit 5ad84c1

Browse files
authored
Merge pull request #55065 from nextcloud/fix/noid/return-actually-installed-apps-stable30
[stable30] fix(Apps): fix install command check on existing apps
2 parents 0ddfc75 + ac6653e commit 5ad84c1

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)