Merge pull request #55065 from nextcloud/fix/noid/return-actually-installed-apps-stable30

[stable30] fix(Apps): fix install command check on existing apps
pull/55343/head
Arthur Schiwon 2025-09-29 10:35:38 +07:00 committed by GitHub
commit 5ad84c138a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

@ -9,6 +9,7 @@ declare(strict_types=1);
namespace OC\Core\Command\App;
use OC\Installer;
use OCP\App\AppPathNotFoundException;
use OCP\App\IAppManager;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
@ -58,9 +59,11 @@ class Install extends Command {
$appId = $input->getArgument('app-id');
$forceEnable = (bool) $input->getOption('force');
if ($this->appManager->isInstalled($appId)) {
try {
$this->appManager->getAppPath($appId);
$output->writeln($appId . ' already installed');
return 1;
} catch (AppPathNotFoundException) {
}
try {