Windows bootstrap: fail on non-x86

This commit is contained in:
Rune K. Svendsen 2024-02-07 10:50:38 +01:00
parent 2a79c669a5
commit c92f71471d
1 changed files with 7 additions and 0 deletions

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')