handle spaces in input param defaults (#590)
This commit is contained in:
committed by
Michael Haag
parent
d336c79cc4
commit
3d839e7bd6
+3
-6
@@ -103,12 +103,9 @@ function Invoke-AtomicTest {
|
||||
$isElevated = $false
|
||||
}
|
||||
function Get-InputArgs([hashtable]$ip) {
|
||||
$inputArgsDefault = [Array]($ip.Keys).Split(" ")
|
||||
$inputDefaults = [Array]($ip.Values | ForEach-Object { $_.default.toString() }).Split(" ")
|
||||
$defaultArgs = @{ }
|
||||
for ($i = 0; $i -lt $inputArgsDefault.Length; $i++) {
|
||||
$defaultArgs[$inputArgsDefault[$i]] = $inputDefaults[$i]
|
||||
|
||||
foreach ($key in $ip.Keys) {
|
||||
$defaultArgs[$key] = $ip[$key].default
|
||||
}
|
||||
# overwrite defaults with any user supplied values
|
||||
foreach ($key in $InputArgs.Keys) {
|
||||
@@ -290,4 +287,4 @@ function Invoke-AtomicTest {
|
||||
|
||||
} # End of PROCESS block
|
||||
END { } # Intentionally left blank and can be removed
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user