Skip to content

fix: check windows downloads with .NET SHA256 instead of Get-FileHash - #77

Merged
backnotprop merged 1 commit into
mainfrom
fix/75-sha256-fallback
Oct 23, 2026
Merged

backnotprop merged 1 commit into
mainfrom
fix/75-sha256-fallback

Conversation

@backnotprop

Copy link
Copy Markdown
Contributor

Fixes #75. When Windows PowerShell 5.1 is started from a PowerShell 7 session, it can load PowerShell 7's Utility module, so Get-FileHash is missing and the checksum step fails.

Both Windows fetchers now hash downloads with System.Security.Cryptography.SHA256 through a small Get-Sha256Hex helper. scripts/test-windows-full-manifest.py fails if either fetcher calls Get-FileHash again.

Windows PowerShell 5.1 started from a process that came from PowerShell 7
inherits a PSModulePath listing PowerShell 7's modules first. It then
loads the Core-only Microsoft.PowerShell.Utility manifest, and the 5.1
script functions of that module, Get-FileHash among them, are missing.
The checksum step threw and the install aborted.

Both Windows fetchers now hash the download with
System.Security.Cryptography.SHA256, which behaves the same in 5.1 and 7
whatever the module path says. The manifest test fails if either
fetcher calls Get-FileHash again.

refs #75
@backnotprop
backnotprop merged commit 4dfb52e into main Oct 23, 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.

Windows install fails when PSModulePath lists PowerShell 7 module paths first

1 participant