Compare commits
2 Commits
d4125b869d
...
19a4c88792
| Author | SHA1 | Date |
|---|---|---|
|
|
19a4c88792 | |
|
|
31d6c8357f |
|
|
@ -524,20 +524,8 @@ class ExternalModuleManager {
|
||||||
return path.dirname(rootCandidate);
|
return path.dirname(rootCandidate);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Nothing found: the cloned ref does not contain a recognizable module structure.
|
// Nothing found: return configured path (preserves old behavior for error messaging)
|
||||||
// This happens when a stable tag predates a module restructure (e.g. the repo
|
return path.dirname(configuredPath);
|
||||||
// moved files from payload/ to skills/ after the tag was cut). Returning a
|
|
||||||
// non-existent path silently causes a confusing ENOENT deep inside copyModuleWithFiltering;
|
|
||||||
// throw a descriptive error here instead so the user knows what happened and how to recover.
|
|
||||||
const resolution = ExternalModuleManager._resolutions.get(moduleCode);
|
|
||||||
const versionHint = resolution?.version ? `version ${resolution.version}` : 'the cloned version';
|
|
||||||
const channelHint =
|
|
||||||
resolution?.channel === 'stable' ? ` Try reinstalling with \`--next=${moduleCode}\` to use the latest main branch instead.` : '';
|
|
||||||
throw new Error(
|
|
||||||
`Module '${moduleCode}' was downloaded but its module definition was not found. ` +
|
|
||||||
`Expected '${moduleDefinitionPath}' to exist in ${versionHint}, but it is missing. ` +
|
|
||||||
`The repository may have been restructured after this release was tagged.${channelHint}`,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
cachedModules = null;
|
cachedModules = null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue