Skip to content

fix(install): Windows PowerShell 5.x redirect + arm64 fallback#375

Merged
wesm merged 1 commit into
mainfrom
fix/install-command
Jun 8, 2026
Merged

fix(install): Windows PowerShell 5.x redirect + arm64 fallback#375
wesm merged 1 commit into
mainfrom
fix/install-command

Conversation

@wesm

@wesm wesm commented Jun 8, 2026

Copy link
Copy Markdown
Member

Fixes the Windows installer (irm https://msgvault.io/install.ps1 | iex), reported in #374.

PowerShell 5.x: "maximum redirection count exceeded"

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 one-liner uses) throws a System.InvalidOperationException for the 302 rather than a WebException, so $_.Exception.Response is null and the installer aborts. Now follow the 302 with a HEAD request and read the final resolved URL (ResponseUri on 5.x, RequestMessage.RequestUri on 7+).

Windows arm64: 404 on a non-existent asset

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.

Closes #374

🤖 Generated with Claude Code

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-ci

roborev-ci Bot commented Jun 8, 2026

Copy link
Copy Markdown

roborev: Combined Review (a5e80a0)

No issues found.


Panel: ci_default_security | Synthesis: codex | Members: codex_default (codex/default, done, 1m26s), codex_security (codex/security, done, 37s) | Total: 2m3s

@wesm wesm merged commit 128aac1 into main Jun 8, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Issue with install command

1 participant