Skip to content

fix: PowerShell 5.1 compatibility for install.ps1#652

Merged
fengmk2 merged 2 commits intomainfrom
fix-pws-windows
Feb 27, 2026
Merged

fix: PowerShell 5.1 compatibility for install.ps1#652
fengmk2 merged 2 commits intomainfrom
fix-pws-windows

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Feb 27, 2026

  • Replace 3-argument Join-Path calls with nested 2-argument calls
    (PS5 only supports 2 arguments)
  • add UTF-8 BOM to install.ps1 for PowerShell 5.1 compatibility
  • Add PowerShell 5.1 CI job using shell: powershell to prevent
    regressions

closes voidzero-dev/vite-plus-discussions#14

@fengmk2 fengmk2 self-assigned this Feb 27, 2026
Copy link
Copy Markdown
Member Author

fengmk2 commented Feb 27, 2026

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

@fengmk2 fengmk2 marked this pull request as ready for review February 27, 2026 06:50
Comment thread packages/cli/install.ps1 Outdated
@fengmk2 fengmk2 force-pushed the fix-pws-windows branch 2 times, most recently from 074d49a to 13f6aac Compare February 27, 2026 07:01
Comment thread packages/cli/install.ps1
Copy link
Copy Markdown
Member Author

fengmk2 commented Feb 27, 2026

add UTF-8 BOM to install.ps1 for PowerShell 5.1 compatibility

- Replace 3-argument Join-Path calls with nested 2-argument calls
  (PS5 only supports 2 arguments)
- Replace Unicode checkmark (✔) with ASCII (+) to avoid encoding
  issues on PS5's default console
- Add PowerShell 5.1 CI job using `shell: powershell` to prevent
  regressions
PS5 reads .ps1 files using the system default encoding (Windows-1252)
unless a UTF-8 BOM is present. Without BOM, the ✔ character's third
UTF-8 byte (0x94) is misinterpreted as a double-quote in Windows-1252,
causing a parser error. Adding the BOM lets PS5 correctly parse the
file as UTF-8, restoring the ✔ checkmark.
@fengmk2 fengmk2 merged commit 0e59f58 into main Feb 27, 2026
24 checks passed
Copy link
Copy Markdown
Member Author

fengmk2 commented Feb 27, 2026

Merge activity

@fengmk2 fengmk2 deleted the fix-pws-windows branch February 27, 2026 07:32
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.

Bug: Windows PS script is incompatible with PowerShell 5.x

2 participants