Skip to content

Commit

Permalink
Fixes #37: Incorrect os architecture detection on localized OS
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
abstractionfactory authored Nov 5, 2024
1 parent 3bf57d8 commit 8f98b56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static/install-opentofu.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 8f98b56

Please sign in to comment.