From 0eb20d415cd75770d5e2aed428de0d66ed55c161 Mon Sep 17 00:00:00 2001 From: Nicole Rappe Date: Sun, 12 Oct 2025 16:04:45 -0600 Subject: [PATCH] Fix PowerShell null-coalescing usage for Ansible EE --- Borealis.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Borealis.ps1 b/Borealis.ps1 index b4527d8..3cd2d06 100644 --- a/Borealis.ps1 +++ b/Borealis.ps1 @@ -524,7 +524,11 @@ function Ensure-AnsibleExecutionEnvironment { $existingPython = $pythonCandidates | Where-Object { Test-Path $_ -PathType Leaf } | Select-Object -First 1 - $expectedVersionNorm = ($ExpectedVersion ?? '1.0.0').Trim() + $expectedVersionNorm = $ExpectedVersion + if ([string]::IsNullOrWhiteSpace($expectedVersionNorm)) { + $expectedVersionNorm = '1.0.0' + } + $expectedVersionNorm = $expectedVersionNorm.Trim() $isUpToDate = $false if ($existingPython -and $currentVersion -and ($currentVersion -eq $expectedVersionNorm)) { if (-not $requirementsHash -or ($currentHash -and $currentHash -eq $requirementsHash)) {