From 860caa0849e52736bed915fb68510f1c337ff9f4 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 15 Jan 2024 16:28:50 +0100 Subject: [PATCH] make failure to load app commands non-fatal Signed-off-by: Robin Appelman --- lib/private/Console/Application.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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("" . $e->getMessage() . ""); + $this->logger->error($e->getMessage(), [ + 'exception' => $e, + ]); + } } // load from register_command.php \OC_App::registerAutoloading($app, $appPath); -- 2.39.5