Browse Source
Merge pull request #42811 from nextcloud/app-command-load-non-fatal
make failure to load app commands non-fatal
pull/43296/head
Robin Appelman
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
8 additions and
1 deletions
-
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); |
|
|
|
|