diff options
author | Robin Appelman <robin@icewind.nl> | 2024-01-15 16:28:50 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-02-02 15:01:13 +0000 |
commit | 44d3a4ffbaaa70a85d35cf2409a34298f9927f8d (patch) | |
tree | d9bdf7217dd1e78b21240faeb23a3222a1a3d81a | |
parent | 30706d4f41ccf9da27a210e4110cf9cccd7357c9 (diff) | |
download | nextcloud-server-44d3a4ffbaaa70a85d35cf2409a34298f9927f8d.tar.gz nextcloud-server-44d3a4ffbaaa70a85d35cf2409a34298f9927f8d.zip |
make failure to load app commands non-fatal
Signed-off-by: Robin Appelman <robin@icewind.nl>
-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); |