Merge pull request #55832 from nextcloud/backport/55395/stable32

[stable32] fix(Apps): fix install command check on existing apps
This commit is contained in:
Joas Schilling 2025-10-28 08:26:12 +01:00 committed by GitHub
commit fcc36ab90c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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->isEnabledForAnyone($appId)) {
try {
$this->appManager->getAppPath($appId);
$output->writeln($appId . ' already installed');
return 1;
} catch (AppPathNotFoundException) {
}
try {