Skip to content

Commit

Permalink
args array and pause runner option
Browse files Browse the repository at this point in the history
  • Loading branch information
clr2of8 committed Oct 10, 2023
1 parent 35be393 commit d08dfec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Private/Invoke-ExecuteCommand.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ function Invoke-ExecuteCommand ($finalCommand, $executor, $executionPlatform, $T
$execPrefix = "/c";
$execExe = "cmd.exe";
$execCommand = $finalCommand -replace "`n", " & "
}
$arguments = $execPrefix,"$execCommand"
}
else {
$finalCommand = $finalCommand -replace "[\\](?!;)", "`\$&"
$finalCommand = $finalCommand -replace "[`"]", "`\$&"
$execCommand = $finalCommand -replace "(?<!;)\n", "; "
$arguments = "$execPrefix $execCommand"

}
$arguments = $execPrefix,"$execCommand"
}
elseif ($executor -eq "powershell") {
$execCommand = $finalCommand -replace "`"", "`\`"`""
Expand Down

0 comments on commit d08dfec

Please sign in to comment.