Repository navigation
fix: check windows downloads with .NET SHA256 instead of Get-FileHash - #77
Merged
Merged
Conversation
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
This was referenced Oct 23, 2026
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 #75. When Windows PowerShell 5.1 is started from a PowerShell 7 session, it can load PowerShell 7's Utility module, so
Get-FileHashis missing and the checksum step fails.Both Windows fetchers now hash downloads with
System.Security.Cryptography.SHA256through a smallGet-Sha256Hexhelper.scripts/test-windows-full-manifest.pyfails if either fetcher callsGet-FileHashagain.