Update test.ps1
This commit is contained in:
3
test.ps1
3
test.ps1
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user