Skip to content

fix(cli): avoid symlink EPERM on Windows by falling back to copy/junction#931

Merged
fengmk2 merged 1 commit intomainfrom
fix-883-use-junction-on-win32
Mar 16, 2026
Merged

fix(cli): avoid symlink EPERM on Windows by falling back to copy/junction#931
fengmk2 merged 1 commit intomainfrom
fix-883-use-junction-on-win32

Conversation

@fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Mar 16, 2026

closes #883

On Windows, creating symlinks requires administrator privileges. This
fixes all symlink operations across the codebase:

  • agent.ts: catch EPERM on file symlinks and fall back to copyFile
  • skills.ts: use junction type for dir symlinks on Windows, and fix
    readlink comparison to use absolute path (junctions store absolute)
  • install-global-cli.ts: use junction type for dir symlinks on Windows

@netlify
Copy link

netlify bot commented Mar 16, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 1a89256
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69b769dbfc17db000840a078

@fengmk2 fengmk2 requested review from Brooooooklyn and cpojer March 16, 2026 01:58
@fengmk2 fengmk2 self-assigned this Mar 16, 2026
Copy link
Member Author

fengmk2 commented Mar 16, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@fengmk2 fengmk2 marked this pull request as ready for review March 16, 2026 01:58
Copy link
Member Author

fengmk2 commented Mar 16, 2026

Merge activity

  • Mar 16, 2:23 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 16, 2:23 AM UTC: Graphite rebased this pull request as part of a merge.
  • Mar 16, 2:24 AM UTC: Graphite rebased this pull request as part of a merge.
  • Mar 16, 2:43 AM UTC: @fengmk2 merged this pull request with Graphite.

@fengmk2 fengmk2 force-pushed the fix-883-use-junction-on-win32 branch from 72f7e37 to eafbb57 Compare March 16, 2026 02:23
…tion

closes #883

On Windows, creating symlinks requires administrator privileges. This
fixes all symlink operations across the codebase:

- agent.ts: catch EPERM on file symlinks and fall back to copyFile
- skills.ts: use junction type for dir symlinks on Windows, and fix
  readlink comparison to use absolute path (junctions store absolute)
- install-global-cli.ts: use junction type for dir symlinks on Windows
@fengmk2 fengmk2 force-pushed the fix-883-use-junction-on-win32 branch from eafbb57 to 1a89256 Compare March 16, 2026 02:24
@fengmk2 fengmk2 merged commit 90a23d5 into main Mar 16, 2026
22 checks passed
@fengmk2 fengmk2 deleted the fix-883-use-junction-on-win32 branch March 16, 2026 02:43
@fengmk2 fengmk2 mentioned this pull request Mar 16, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When creating a Viteplus project, selecting two agents results in an error.

3 participants