From 1f4f48b58db4fc6b6adb312c2f9a55c8071e9c49 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Wed, 3 Dec 2025 08:42:23 +1100 Subject: [PATCH] Use culture-invariant formatting for version number #78 Replaces string formatting of the version number with culture-invariant double parsing and formatting to ensure consistent decimal representation regardless of system locale. --- Apps/Get-genuagenuReSI.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Apps/Get-genuagenuReSI.ps1 b/Apps/Get-genuagenuReSI.ps1 index 42795fb..59a199d 100644 --- a/Apps/Get-genuagenuReSI.ps1 +++ b/Apps/Get-genuagenuReSI.ps1 @@ -21,9 +21,9 @@ function Get-genuagenuReSI { return } - # Normalize version number to two decimal places - $NormalizedVersion = "{0:N2}" -f $LatestVersion - $Version = $NormalizedVersion.ToString() + # Normalize version number to two decimal places (culture-invariant) + $NormalizedVersion = [System.Double]::Parse($LatestVersion).ToString("F2", [System.Globalization.CultureInfo]::InvariantCulture) + $Version = $NormalizedVersion # Get the checksum details $Checksum = Invoke-EvergreenRestMethod -Uri ($res.Get.Download.ChecksumUri -replace "#version", $Version)