FIX: do not prevent running ModuleManager in CLI mode
This commit is contained in:
@@ -15,15 +15,15 @@ class ModuleManager extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
// ignore running from artisan
|
// this service provider needs published config - config is merged right after this service provider
|
||||||
if (App::runningInConsole()) {
|
try {
|
||||||
|
$modules = Module::where('is_template', false)
|
||||||
|
->get();
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
// ignore error
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// this service provider needs published config - config is merged right after this service provider
|
|
||||||
$modules = Module::where('is_template', false)
|
|
||||||
->get();
|
|
||||||
|
|
||||||
// iterate over all modules and enable or disable them
|
// iterate over all modules and enable or disable them
|
||||||
foreach ($modules as $module) {
|
foreach ($modules as $module) {
|
||||||
$this->createModulesJson($module);
|
$this->createModulesJson($module);
|
||||||
|
|||||||
Reference in New Issue
Block a user