fix(resolve): strip 'v' prefix from version for API compatibility

This commit is contained in:
chenbaowang 2026-04-14 10:32:49 +08:00
parent 6c0d4f4f16
commit c8e58e0476

View file

@ -57,7 +57,8 @@ export function registerResolve(program: Command) {
let targetNamespace = namespace;
let targetSlug = skillSlug;
const specifiedVersion = opts.skillVersion;
// Strip 'v' prefix if present (both 1.0.0 and v1.0.0 should work)
const specifiedVersion = opts.skillVersion?.replace(/^v/, "");
// Case 1: User specified a version
if (specifiedVersion) {