diff options
author | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-02-05 13:55:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-05 13:55:57 +0100 |
commit | 3ad0dfb5825d41de8f86ac33acc4846ecf618760 (patch) | |
tree | 7428267873121044ea6dc89ee34dcdaa28dd76e2 | |
parent | a71b6ae432a206aa5568a3b513da50a8b3c52305 (diff) | |
parent | 226fa9b039dfd56e91a154a741f7e9637e21eb89 (diff) | |
download | nextcloud-server-3ad0dfb5825d41de8f86ac33acc4846ecf618760.tar.gz nextcloud-server-3ad0dfb5825d41de8f86ac33acc4846ecf618760.zip |
Merge pull request #43293 from nextcloud/backport/42811/stable27
[stable27] make failure to load app commands non-fatal
-rw-r--r-- | lib/private/Console/Application.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/private/Console/Application.php b/lib/private/Console/Application.php index 94956364390..7b01bca0c47 100644 --- a/lib/private/Console/Application.php +++ b/lib/private/Console/Application.php @@ -128,7 +128,14 @@ class Application { // load commands using info.xml $info = $appManager->getAppInfo($app); if (isset($info['commands'])) { - $this->loadCommandsFromInfoXml($info['commands']); + try { + $this->loadCommandsFromInfoXml($info['commands']); + } catch (\Throwable $e) { + $output->writeln("<error>" . $e->getMessage() . "</error>"); + $this->logger->error($e->getMessage(), [ + 'exception' => $e, + ]); + } } // load from register_command.php \OC_App::registerAutoloading($app, $appPath); |