From c577893878651e63edd767af7e2e1d4eccea7257 Mon Sep 17 00:00:00 2001 From: George Pollard Date: Fri, 13 Oct 2023 16:10:12 +1300 Subject: [PATCH] Change Powershell architecture detection (#1456) --- install-from-binstall-release.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install-from-binstall-release.ps1 b/install-from-binstall-release.ps1 index f4fad50c..73bc3564 100644 --- a/install-from-binstall-release.ps1 +++ b/install-from-binstall-release.ps1 @@ -2,10 +2,10 @@ $ErrorActionPreference = "Stop" Set-PSDebug -Trace 1 $tmpdir = $Env:TEMP $base_url = "https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-" -$type = (Get-ComputerInfo).CsSystemType.ToLower() -if ($type.StartsWith("x64")) { +$proc_arch = [Environment]::GetEnvironmentVariable("PROCESSOR_ARCHITECTURE", [EnvironmentVariableTarget]::Machine) +if ($proc_arch -eq "AMD64") { $arch = "x86_64" -} elseif ($type.StartsWith("arm64")) { +} elseif ($proc_arch -eq "ARM64") { $arch = "aarch64" } else { Write-Host "Unsupported Architecture: $type" -ForegroundColor Red