-
Notifications
You must be signed in to change notification settings - Fork 125
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
npm run plugin:generate fails on Windows when the user does not have Developer Mode enabled or core.symlinks=true configured in Git. The failure is a three-layer problem:
- Git checkout layer: When
core.symlinks=false(the Windows default), Git writes ~49-byte text stubs instead of actual symbolic links for any symlinked files in the repository. - PowerShell layer:
New-Item -ItemType SymbolicLinkthrowsWin32Exception 1314("A required privilege is not held by the client") on non-elevated Windows without Developer Mode. - No fallback layer: The
New-RelativeSymlinkfunction inPluginHelpers.psm1has no capability detection or fallback, causing the entire plugin generation pipeline to fail.
Reproduction
- On Windows, ensure Developer Mode is off and Git
core.symlinksisfalse(the default). - Run
npm run plugin:generate. - Observe failure with
Win32Exception 1314or broken text stubs inplugins/.
Expected Behavior
Plugin generation should detect symlink capability at runtime and fall back to file copies when symlinks are unavailable. VS Code does not consume the plugins/ directory, and the upstream github/awesome-copilot repository uses fs.copyFileSync exclusively, so copies are functionally equivalent.
Proposed Fix
Replace hard-coded symlink creation with a capability-detected link-or-copy strategy (probe-once architecture):
- Add
Test-SymlinkCapabilityfunction that probes symlink creation via a temp file. - Replace
New-RelativeSymlinkwithNew-PluginLinksupporting both symlink and copy paths. - Pass the capability flag from
Invoke-PluginGenerationdown toWrite-PluginDirectory. - Report the selected strategy via
Write-Verbose.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working