Skip to content

fix(install): make install.ps1 run on Windows PowerShell 3.0 - #251

Merged
wangtsiao merged 2 commits into
mainfrom
fix-install-ps1-ps3-sha256
Oct 20, 2026
Merged

wangtsiao merged 2 commits into
mainfrom
fix-install-ps1-ps3-sha256

Conversation

@wangtsiao

Copy link
Copy Markdown
Contributor

What

devo upgrade downloads and Invoke-Expressions install.ps1, whose
SHA-256 verification relied on Get-FileHash. That cmdlet only exists
from Windows PowerShell 4.0, so upgrading on a 3.0 host (Windows 8 /
Server 2012 default WMF) dies with Get-FileHash is not recognized.

  • Add a Get-Sha256Hex helper that computes the hash through
    System.Security.Cryptography directly (uppercase hex, identical
    output shape) and use it at all six verification sites.
  • Add -UseBasicParsing to the one bare Invoke-WebRequest so the
    ripgrep download does not depend on the IE engine either.

The installers test harness concatenates this script and runs it, so
CI exercises the new helper end to end.

🤖 Generated with Claude Code

wangtsiao and others added 2 commits October 20, 2026 01:15
Get-FileHash requires Windows PowerShell 4+, so `devo upgrade` fails
on 3.0 (the Windows 8 / Server 2012 default) with "Get-FileHash is
not recognized" from the Invoke-Expression'd install.ps1. Compute the
hash with System.Security.Cryptography directly (uppercase hex, same
output shape), and add -UseBasicParsing to the remaining bare
Invoke-WebRequest so the IE engine is not required either.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Get-CachedDevoRuntime runs in fresh [PowerShell] runspaces that only
re-declare Receive-DevoAsset and itself, so its Get-Sha256Hex calls
failed with "The term 'Get-Sha256Hex' is not recognized". Embed the
helper definition in the worker script like the other two functions.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@wangtsiao
wangtsiao merged commit ef6947e into main Oct 20, 2026
25 checks passed
@wangtsiao
wangtsiao deleted the fix-install-ps1-ps3-sha256 branch October 22, 2026 14:19
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.

1 participant