We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8c0c90 commit 426c8d1Copy full SHA for 426c8d1
scripts/utils/Invoke.ps1
@@ -1,4 +1,3 @@
1
-
2
function Invoke-ScriptWithTimeout {
3
param (
4
[string]$ScriptPath,
@@ -7,8 +6,9 @@ function Invoke-ScriptWithTimeout {
7
6
)
8
9
$job = Start-Job -ScriptBlock {
10
- param($scriptPath, $args)
11
- & $scriptPath $args
+ param($scriptPath, $arguments)
+ # Properly expand the arguments when calling the script
+ & $scriptPath @arguments
12
} -ArgumentList $ScriptPath, $Arguments
13
14
$completed = Wait-Job -Job $job -Timeout $TimeoutSeconds
0 commit comments