Skip to content

Fix installer compatibility with Windows PowerShell 5.1 - #72

Merged
merefield merged 1 commit into
mainfrom
fix/windows-powershell-installer
Oct 5, 2026
Merged

merefield merged 1 commit into
mainfrom
fix/windows-powershell-installer

Conversation

@merefield

Copy link
Copy Markdown
Owner

Why

The Windows installer fails before downloading anything in Windows PowerShell environments where RuntimeInformation.OSArchitecture is unavailable. Requiring PowerShell 7 would add an unnecessary installation prerequisite.

Changes

  • Keep runtime OS architecture detection when available; fall back to native Windows architecture environment variables when the property or type is unavailable.
  • Prefer native architecture over shell architecture and reject unsupported or undetermined architectures rather than guessing.
  • Add architecture mapping tests for AMD64, ARM64, emulated shells, missing runtime information and unsupported values.
  • Run the end-to-end installer tests under both Windows PowerShell 5.1 and PowerShell 7 in CI and release workflows.
  • Allow expected child-process failures to reach exit-code assertions under Windows PowerShell stderr handling.
  • Document both supported PowerShell editions and how to check the installed version.

Validation

  • git diff --check passes.
  • PowerShell is not installed in the local Linux environment; Windows execution is delegated to the new CI checks. No claim of local Windows validation.
  • Existing installer tests retain checksum validation, installed binary version checks, invalid version rejection and directory-target protection.

No changes to the Go application, terminal interface or release version.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No unresolved blocking issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Updates the Windows installer for compatibility with Windows PowerShell 5.1 and PowerShell 7.

Changes:

  • Adds robust architecture detection and validation.
  • Expands installer testing across both PowerShell editions.
  • Documents supported PowerShell versions.
File Description
test/​install-release.ps1 Adds architecture and failure-handling tests.
README.md Documents PowerShell compatibility and version checks.
install-release.ps1 Adds architecture resolution and fallback logic.
.github/​workflows/​release.yml Extends release validation to both PowerShell editions.
.github/​workflows/​ci.yml Tests the installer under both PowerShell editions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@merefield
merefield merged commit e1f84e6 into main Oct 5, 2026
7 checks passed
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.

2 participants