]> source.dussan.org Git - nextcloud-server.git/commitdiff
make failure to load app commands non-fatal 42811/head
authorRobin Appelman <robin@icewind.nl>
Mon, 15 Jan 2024 15:28:50 +0000 (16:28 +0100)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Fri, 2 Feb 2024 12:47:17 +0000 (13:47 +0100)
Signed-off-by: Robin Appelman <robin@icewind.nl>
lib/private/Console/Application.php

index 900b2c57f413f1ad87b0a0e23c51c61270c1446b..44f64e09e943e3c2484ceb06b20904716a54a1b6 100644 (file)
@@ -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);