Register valid root for all installed apps in console
We need to use commands from apps that aren't enabled (so don't get loaded).
This commit is contained in:
parent
4a777d686b
commit
dad56921ae
|
@ -55,7 +55,9 @@ class Application {
|
||||||
if (!\OCP\Util::needUpgrade()) {
|
if (!\OCP\Util::needUpgrade()) {
|
||||||
OC_App::loadApps();
|
OC_App::loadApps();
|
||||||
foreach (\OC::$server->getAppManager()->getInstalledApps() as $app) {
|
foreach (\OC::$server->getAppManager()->getInstalledApps() as $app) {
|
||||||
$file = OC_App::getAppPath($app) . '/appinfo/register_command.php';
|
$appPath = \OC_App::getAppPath($app);
|
||||||
|
\OC::$loader->addValidRoot($appPath);
|
||||||
|
$file = $appPath . '/appinfo/register_command.php';
|
||||||
if (file_exists($file)) {
|
if (file_exists($file)) {
|
||||||
require $file;
|
require $file;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue