From 8f98b56384c6bb90b72a7f832ec55d7509b94899 Mon Sep 17 00:00:00 2001 From: AbstractionFactory <179820029+abstractionfactory@users.noreply.github.com> Date: Tue, 5 Nov 2024 08:30:36 +0100 Subject: [PATCH] Fixes #37: Incorrect os architecture detection on localized OS This change replaces the call to Get-CimInstance Win32_operatingsystem, which returns a localized string (e.g. 64-bitowy on a Polish OS) with [Environment]::Is64BitOperatingSystem. Signed-off-by: AbstractionFactory <179820029+abstractionfactory@users.noreply.github.com> --- static/install-opentofu.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/install-opentofu.ps1 b/static/install-opentofu.ps1 index 26ce059..5da840b 100755 --- a/static/install-opentofu.ps1 +++ b/static/install-opentofu.ps1 @@ -355,7 +355,7 @@ function installStandalone() { logInfo "Downloading OpenTofu version ${opentofuVersion}..." $tempPath = tempdir - if ((Get-CimInstance Win32_operatingsystem).OSArchitecture -eq "64-bit") { + if ([Environment]::Is64BitOperatingSystem) { $arch = "amd64" } else { $arch = "386"