fix: use directory junctions on Windows for skill linking (#24823)

This commit is contained in:
Enjoy Kumawat
2026-04-08 00:58:43 +05:30
committed by GitHub
parent 5588000e93
commit ab3075feb9
2 changed files with 72 additions and 82 deletions
+7 -1
View File
@@ -248,7 +248,13 @@ export async function linkSkill(
await fs.rm(destPath, { recursive: true, force: true });
}
await fs.symlink(skillSourceDir, destPath, 'dir');
// Use 'junction' on Windows to avoid EPERM errors — junctions don't
// require elevated privileges or Developer Mode (fixes #24816)
await fs.symlink(
skillSourceDir,
destPath,
process.platform === 'win32' ? 'junction' : 'dir',
);
linkedSkills.push({ name: skillName, location: destPath });
}