Skip to content

feat: add Windows support via file-copy apply mode#3

Open
a3chron wants to merge 1 commit into
mainfrom
feat/windows-support
Open

feat: add Windows support via file-copy apply mode#3
a3chron wants to merge 1 commit into
mainfrom
feat/windows-support

Conversation

@a3chron

@a3chron a3chron commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Windows handles symlinks poorly (they need Developer Mode or admin), so on Windows stellar now copies the theme file over starship.toml instead of symlinking. The mode is selected by runtime.GOOS and overridable via STELLAR_APPLY_MODE=copy|symlink for testing.

  • symlink: rename CreateSymlink -> ApplyTheme, add IsCopyMode() and a shared copyFile helper; back up the user's original config safely in copy mode (never overwrite an existing backup, so a lost config.json can't clobber it)
  • current: make verification mode-aware (only readlink in symlink mode)
  • update: unblock Windows, append .exe, download next to the binary, and do a Windows-safe self-replace; clean up the leftover .old on the next run
  • goreleaser: build windows/amd64 + windows/arm64
  • installer: add install.ps1 and point install.sh's Windows guard at it
  • tests: copy-mode unit and e2e coverage, incl. the backup-clobber safety net

Windows handles symlinks poorly (they need Developer Mode or admin), so on
Windows stellar now copies the theme file over starship.toml instead of
symlinking. The mode is selected by runtime.GOOS and overridable via
STELLAR_APPLY_MODE=copy|symlink for testing.

- symlink: rename CreateSymlink -> ApplyTheme, add IsCopyMode() and a shared
  copyFile helper; back up the user's original config safely in copy mode
  (never overwrite an existing backup, so a lost config.json can't clobber it)
- current: make verification mode-aware (only readlink in symlink mode)
- update: unblock Windows, append .exe, download next to the binary, and do a
  Windows-safe self-replace; clean up the leftover .old on the next run
- goreleaser: build windows/amd64 + windows/arm64
- installer: add install.ps1 and point install.sh's Windows guard at it
- tests: copy-mode unit and e2e coverage, incl. the backup-clobber safety net

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

[Feature Request] Add native PowerShell installation script (install.ps1)

1 participant