Skip to content

Use Windows junctions for setup links - #1943

Closed
JonasFocus wants to merge 1 commit into
garrytan:mainfrom
JonasFocus:fix/1877-windows-junction
Closed

JonasFocus wants to merge 1 commit into
garrytan:mainfrom
JonasFocus:fix/1877-windows-junction

Conversation

@JonasFocus

Copy link
Copy Markdown

Fixes #1877

Summary:

  • Tries mklink /J for Windows directory links before falling back to copies.
  • Keeps file-copy fallback and non-Windows symlink behavior unchanged.
  • Adds regression coverage with fake cmd.exe and cygpath so the junction branch is exercised outside Windows.

Verification:

  • bash -n setup
  • bun test test/setup-windows-fallback.test.ts
  • git diff --check

@trunk-io

trunk-io Bot commented Jun 9, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@capy-ai

capy-ai Bot commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Thanks @JonasFocus for the junction work and the careful Windows testing. We decided to keep setup's staged copy on Windows for now: it works today, and switching to links changes what every refresh, prune and uninstall deletes, which needs its own end-to-end proof. Your design is recorded as the starting point in the install-footprint theme (#3139, TODOS.md), with credit, for when we pick links up again.

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.

Windows: Use Junction (mklink /J) instead of copying to save disk space

1 participant