fix(install): Windows PowerShell 5.x redirect + arm64 fallback#375
Merged
Conversation
Get-LatestVersion requested /releases/latest with MaximumRedirection=0 and read the Location header off the redirect. That works in PowerShell 7+, but Windows PowerShell 5.x (the powershell host the install one-liner uses) throws a System.InvalidOperationException for the 302 rather than a WebException, so $_.Exception.Response is null and the installer aborts with "maximum redirection count exceeded". Now follow the 302 with a HEAD request and read the final resolved URL (ResponseUri on 5.x, RequestMessage.RequestUri on 7+). Get-Architecture detects arm64, but the release matrix only publishes windows_amd64, so the arm64 download URL 404s. The installer now resolves the release arch before downloading: it prefers a native build and falls back to windows_amd64 (which runs under Windows-on-ARM x64 emulation) with a clear warning. Once a native windows/arm64 asset is published it is preferred automatically. Ports the install.ps1 fixes from agentsview b328d24f to msgvault. Closes #374 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
roborev: Combined Review (
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the Windows installer (
irm https://msgvault.io/install.ps1 | iex), reported in #374.PowerShell 5.x: "maximum redirection count exceeded"
Get-LatestVersionrequested/releases/latestwithMaximumRedirection = 0and read theLocationheader off the redirect. That works in PowerShell 7+, but Windows PowerShell 5.x (thepowershellhost the one-liner uses) throws aSystem.InvalidOperationExceptionfor the 302 rather than aWebException, so$_.Exception.Responseis null and the installer aborts. Now follow the 302 with aHEADrequest and read the final resolved URL (ResponseUrion 5.x,RequestMessage.RequestUrion 7+).Windows arm64: 404 on a non-existent asset
Get-Architecturedetects arm64, but the release matrix only publisheswindows_amd64, so the arm64 download URL 404s. The installer now resolves the release arch before downloading: it prefers a native build and falls back towindows_amd64(which runs under Windows-on-ARM x64 emulation) with a clear warning. Once a nativewindows/arm64asset is published it is preferred automatically.Ports the
install.ps1fixes from agentsviewb328d24f.Closes #374
🤖 Generated with Claude Code