Skip to content

Commit

Permalink
make failure to load app commands non-fatal
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 authored and JuliaKirschenheuter committed Feb 5, 2024
1 parent 4ad1735 commit 78bb05d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/private/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,14 @@ public function loadCommands(
// 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);
Expand Down

0 comments on commit 78bb05d

Please sign in to comment.