FIX: fix module installator to skip Database directory in subdmodules
This commit is contained in:
@@ -40,8 +40,6 @@ class InstallModule extends Command
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*
|
|
||||||
* @return mixed
|
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
@@ -56,6 +54,9 @@ class InstallModule extends Command
|
|||||||
// get config
|
// get config
|
||||||
$config = $this->loadConfig();
|
$config = $this->loadConfig();
|
||||||
|
|
||||||
|
if (empty($config))
|
||||||
|
return;
|
||||||
|
|
||||||
// check if it is valid
|
// check if it is valid
|
||||||
$this->checkMandatoryFields($config);
|
$this->checkMandatoryFields($config);
|
||||||
|
|
||||||
@@ -78,6 +79,9 @@ class InstallModule extends Command
|
|||||||
$basePath = $this->modulesPath . DIRECTORY_SEPARATOR . $this->moduleName . DIRECTORY_SEPARATOR;
|
$basePath = $this->modulesPath . DIRECTORY_SEPARATOR . $this->moduleName . DIRECTORY_SEPARATOR;
|
||||||
$path = $basePath . 'Config' . DIRECTORY_SEPARATOR . 'config.php';
|
$path = $basePath . 'Config' . DIRECTORY_SEPARATOR . 'config.php';
|
||||||
|
|
||||||
|
if (basename($basePath) == 'Database')
|
||||||
|
return [];
|
||||||
|
|
||||||
// check if module has Config/config.php file
|
// check if module has Config/config.php file
|
||||||
if (!file_exists($path)) {
|
if (!file_exists($path)) {
|
||||||
$path = $basePath . 'info.php';
|
$path = $basePath . 'info.php';
|
||||||
|
|||||||
Reference in New Issue
Block a user