fix: resolve core module installation path lookup

The core module lives in src/core, not src/modules like other modules.
Added special handling in findModuleSource() to correctly locate the
core module using getSourcePath('core') instead of falling through to
the default src/modules search path.
This commit is contained in:
Scott Jennings 2025-12-07 16:46:57 -06:00
parent 38e65abd83
commit fcfbcd1b49
1 changed files with 9 additions and 0 deletions

View File

@ -300,6 +300,15 @@ class ModuleManager {
* @returns {string|null} Path to the module source or null if not found
*/
async findModuleSource(moduleName) {
// Special handling for core module - it's in src/core not src/modules
if (moduleName === 'core') {
const corePath = getSourcePath('core');
if (await fs.pathExists(corePath)) {
return corePath;
}
return null;
}
const projectRoot = getProjectRoot();
// First, check src/modules