Merge remote-tracking branch 'origin/windows-bootstrap-fail-on-non-x86'

This commit is contained in:
Julian Ospald 2024-02-09 21:40:40 +08:00
commit 9de324d3c3
No known key found for this signature in database
GPG Key ID: 4275CDA6A29BED43

View File

@ -187,6 +187,13 @@ function Exec
}
}
# Only x86 32/64-bit is supported
$SupportedArchitectures = 'AMD64', 'x86'
if (!$SupportedArchitectures.contains($env:PROCESSOR_ARCHITECTURE)) {
Print-Msg -color Red -msg ("Unsupported processor architecture: {0}. Supported architectures: {1}." -f $env:PROCESSOR_ARCHITECTURE, ($SupportedArchitectures -join ", "))
Exit 1
}
$ErrorActionPreference = 'Stop'
$GhcupBasePrefixEnv = [System.Environment]::GetEnvironmentVariable('GHCUP_INSTALL_BASE_PREFIX', 'user')