From c92f71471df919928fd35c6e73c2cebbac4200a3 Mon Sep 17 00:00:00 2001 From: "Rune K. Svendsen" Date: Wed, 7 Feb 2024 10:50:38 +0100 Subject: [PATCH] Windows bootstrap: fail on non-x86 --- scripts/bootstrap/bootstrap-haskell.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/bootstrap/bootstrap-haskell.ps1 b/scripts/bootstrap/bootstrap-haskell.ps1 index 7e2cc2c4..d31f79d9 100644 --- a/scripts/bootstrap/bootstrap-haskell.ps1 +++ b/scripts/bootstrap/bootstrap-haskell.ps1 @@ -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')