Only set noInit on PluginManager for specific CLI commands (october:up, october:update)
This commit is contained in:
parent
8d618d4e29
commit
886e6fc70a
|
|
@ -5,6 +5,7 @@ use Lang;
|
|||
use Event;
|
||||
use Config;
|
||||
use Backend;
|
||||
use Request;
|
||||
use DbDongle;
|
||||
use BackendMenu;
|
||||
use BackendAuth;
|
||||
|
|
@ -66,7 +67,11 @@ class ServiceProvider extends ModuleServiceProvider
|
|||
*/
|
||||
$requestPath = \October\Rain\Router\Helper::normalizeUrl(\Request::path());
|
||||
$systemPath = \October\Rain\Router\Helper::normalizeUrl(Config::get('cms.backendUri') . '/system/updates');
|
||||
if (App::runningInConsole() || stripos($requestPath, $systemPath) === 0)
|
||||
if (stripos($requestPath, $systemPath) === 0)
|
||||
PluginManager::$noInit = true;
|
||||
|
||||
$updateCommands = ['october:up', 'october:update'];
|
||||
if (App::runningInConsole() && count(array_intersect($updateCommands, Request::server('argv'))) > 0)
|
||||
PluginManager::$noInit = true;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue