Update test.ps1

This commit is contained in:
2026-02-05 02:33:36 -05:00
parent 421b734111
commit b64e3ed273

View File

@@ -206,7 +206,8 @@ function Invoke-ServiceImagePathAudit {
# Only "bad" if the exe path contains whitespace and is unquoted (it is)
if ($exe -match '\s') {
$badKey = "Yes"
$fixed = '"' + $exe + '"' + ($args ?? '')
$fixed = '"' + $exe + '"' + ($(if ($null -ne $args) { $args } else { '' }))
#PoSH 7 $fixed = '"' + $exe + '"' + ($args ?? '')
} else {
$badKey = "No"
$fixed = "N/A"