From 53823bad8123e066a8e8af9149c4a800b23a4536 Mon Sep 17 00:00:00 2001 From: cyph3rasi <1+cyph3rasi@noreply.githop.xyz> Date: Sun, 12 Jul 2026 02:05:47 +0000 Subject: [PATCH] Support Windows PowerShell 5 architecture detection --- scripts/install.ps1 | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/install.ps1 b/scripts/install.ps1 index b0edc44..a96c7d1 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -11,10 +11,15 @@ param( $ErrorActionPreference = "Stop" $GiteaUrl = $GiteaUrl.TrimEnd("/") -switch ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString()) { - "X64" { $arch = "amd64" } - "Arm64" { $arch = "arm64" } - default { throw "Unsupported Windows architecture: $($_)" } +$architecture = if ($env:PROCESSOR_ARCHITEW6432) { + [string]$env:PROCESSOR_ARCHITEW6432 +} else { + [string]$env:PROCESSOR_ARCHITECTURE +} +switch ($architecture.ToUpperInvariant()) { + "AMD64" { $arch = "amd64" } + "ARM64" { $arch = "arm64" } + default { throw "Unsupported Windows architecture: $architecture" } } $asset = "hop_windows_${arch}.zip" @@ -92,3 +97,4 @@ try { } +