Skip to content

Commit

Permalink
Merge pull request #42811 from nextcloud/app-command-load-non-fatal
Browse files Browse the repository at this point in the history
make failure to load app commands non-fatal
  • Loading branch information
icewind1991 authored Feb 2, 2024
2 parents 6de23a3 + 860caa0 commit 20aa86f
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 20aa86f

Please sign in to comment.