Change Powershell architecture detection (#1456)

This commit is contained in:
George Pollard 2023-10-13 16:10:12 +13:00 committed by GitHub
parent 3cf76cd0a9
commit c577893878
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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