summaryrefslogtreecommitdiffstats
path: root/lib/private/Console/Application.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Console/Application.php')
-rw-r--r--lib/private/Console/Application.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/Console/Application.php b/lib/private/Console/Application.php
index 12d54b48fa9..fc48f57e499 100644
--- a/lib/private/Console/Application.php
+++ b/lib/private/Console/Application.php
@@ -34,6 +34,7 @@ use OC\MemoryInfo;
use OC\NeedsUpdateException;
use OC_App;
use OCP\AppFramework\QueryException;
+use OCP\App\IAppManager;
use OCP\Console\ConsoleEvent;
use OCP\IConfig;
use OCP\IRequest;
@@ -117,13 +118,14 @@ class Application {
$this->writeMaintenanceModeInfo($input, $output);
} else {
OC_App::loadApps();
- foreach (\OC::$server->getAppManager()->getInstalledApps() as $app) {
+ $appManager = \OCP\Server::get(IAppManager::class);
+ foreach ($appManager->getInstalledApps() as $app) {
$appPath = \OC_App::getAppPath($app);
if ($appPath === false) {
continue;
}
// load commands using info.xml
- $info = \OC_App::getAppInfo($app);
+ $info = $appManager->getAppInfo($app);
if (isset($info['commands'])) {
$this->loadCommandsFromInfoXml($info['commands']);
}