Fix for Windows setup script not working in non-Latin systems (#718)

Fix Windows setup script not working in non-Latin systems
 - Replace the system architecture check to use a method with a stable output
This commit is contained in:
Vítor Vasconcellos 2023-04-18 18:36:04 +00:00 committed by GitHub
parent 7612458d76
commit 9dea149eea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,7 +30,7 @@ function Set-EnvVar($variable, $value = $null) {
if ((-not [string]::IsNullOrEmpty($env:PROCESSOR_ARCHITEW6432)) -or (
"$env:PROCESSOR_ARCHITECTURE" -eq 'ARM64'
) -or (
(Get-CimInstance Win32_operatingsystem).OSArchitecture -ne '64-bit'
-not [System.Environment]::Is64BitOperatingSystem
# Powershell >= 6 is cross-platform, check if running on Windows
) -or (($PSVersionTable.PSVersion.Major -ge 6) -and (-not $IsWindows))
) {