diff --git a/src/Command/GeneratorModuleCommand.php b/src/Command/GeneratorModuleCommand.php
index <HASH>..<HASH> 100644
--- a/src/Command/GeneratorModuleCommand.php
+++ b/src/Command/GeneratorModuleCommand.php
@@ -120,12 +120,7 @@ class GeneratorModuleCommand extends GeneratorCommand
 
         $modules = system_rebuild_module_data();
         foreach ($modules as $module_id => $module) {
-          if ($module->origin == 'core') {
-            continue;
-          }
-          if (strstr($module->subpath, 'modules/custom/')) {
-            array_push($local_modules, str_replace('modules/custom/', '', $module->subpath));
-          }
+          array_push($local_modules, basename($module->subpath));
         }
 
         $checked_dependecies = array(
Enable select core modules or any other module available doesn't matter their location