From dd51acfe65d994e6330c36ffe6c8697d9b15528c Mon Sep 17 00:00:00 2001 From: Shaw Innes Date: Fri, 6 Mar 2026 22:51:34 +1000 Subject: [PATCH] fix: use junction type on Windows for skills symlinks to avoid EPERM --- src/commands/skillsInstall.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/commands/skillsInstall.ts b/src/commands/skillsInstall.ts index bdc080e..416fd06 100644 --- a/src/commands/skillsInstall.ts +++ b/src/commands/skillsInstall.ts @@ -60,7 +60,12 @@ export function linkSkillEntries( } try { - fs.symlinkSync(source, target); + // On Windows, directory symlinks require elevated privileges or Developer Mode. + // Junctions work for directories without special permissions. + const isDir = fs.statSync(source).isDirectory(); + const type = + process.platform === 'win32' && isDir ? 'junction' : undefined; + fs.symlinkSync(source, target, type); links.push({name: entry, status: 'linked'}); } catch (error) { links.push({