fix: Setup can update the CLI on older Windows PowerShell#1133
Conversation
Unity launches the Setup Wizard installer through Windows PowerShell, where optional archive cmdlets may be unavailable. Compute SHA-256 hashes and extract zip assets with .NET helpers so CLI updates do not fail before installing the native binary.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdd Windows zip assets to mocked releases; parameterize mocked uname; extend curl/tar mocks and add unzip handling to create an executable uloop.exe; replace symlink legacy uloop setup with an executable shim and wrapper tool scripts; update POSIX tests; add Git Bash and PowerShell tests; add a windows-latest CI job. ChangesWindows installer and test-harness updates
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Run the installer release-filter tests on a Windows runner with Git Bash so the Windows install.sh path stays exercised. Update the test harness to avoid Git Bash symlink-copy behavior and document the Git Bash install route.
Summary
User Impact
Get-FileHashnot found error before the native CLI was installed.Changes
ZipFilehelper so the installer does not depend onExpand-Archive.Verification
bash scripts/test-install-release-filter.shpowershell -NoProfile -ExecutionPolicy Bypass -Command '$script = Get-Content -Path "scripts\\install.ps1" -Raw; $null = [scriptblock]::Create($script)'pwsh -NoProfile -Command '$script = Get-Content -Path "scripts\\install.ps1" -Raw; $null = [scriptblock]::Create($script)'git diff --checkSummary
This PR makes the Windows installer resilient on older Windows PowerShell by removing dependencies on optional PowerShell archive/hash cmdlets. The installer now uses .NET APIs for SHA-256 checksumming and ZIP extraction so the CLI update path works even when
Get-FileHashorExpand-Archiveare unavailable.Changes
Windows PowerShell Installer (scripts/install.ps1)
Test Coverage (scripts/test-install-release-filter.sh)
CI Workflow (.github/workflows/build-and-test.yml)
Documentation
Impact
Get-FileHash/Expand-Archiveon older Windows PowerShell (e.g., pre-modern PowerShell on Windows 7/early Windows 10).Verification / Tests run