diff options
author | Robin Appelman <robin@icewind.nl> | 2024-01-15 16:28:50 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2024-02-02 13:47:17 +0100 |
commit | 860caa0849e52736bed915fb68510f1c337ff9f4 (patch) | |
tree | 49d11a91e025f47576a55933a608403313f3728b /lib/private/Console | |
parent | 50fffa8d95aa2b1adc61f69cc76408300438213d (diff) | |
download | nextcloud-server-860caa0849e52736bed915fb68510f1c337ff9f4.tar.gz nextcloud-server-860caa0849e52736bed915fb68510f1c337ff9f4.zip |
make failure to load app commands non-fatal
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Console')
-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); |