diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-02-03 21:18:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-03 21:18:09 +0100 |
commit | b96a2876c2ca8467d45ea9272bb654dee64463c8 (patch) | |
tree | 6af8b7d2f1ee87ff77bb840ed836b5606c32eb8e /lib | |
parent | 54e8c8f0b6b3fe036d0ae58ca8d385a950feebfb (diff) | |
parent | 44d3a4ffbaaa70a85d35cf2409a34298f9927f8d (diff) | |
download | nextcloud-server-b96a2876c2ca8467d45ea9272bb654dee64463c8.tar.gz nextcloud-server-b96a2876c2ca8467d45ea9272bb654dee64463c8.zip |
Merge pull request #43294 from nextcloud/backport/42811/stable28
[stable28] make failure to load app commands non-fatal
Diffstat (limited to 'lib')
-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 900b2c57f41..44f64e09e94 100644 --- a/lib/private/Console/Application.php +++ b/lib/private/Console/Application.php @@ -121,7 +121,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); |