Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[master] Porting #52365 to master #54569

Merged
merged 9 commits into from
Dec 29, 2019
8 changes: 4 additions & 4 deletions pkg/windows/modules/start-process-and-test-exitcode.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Function Start_Process_and_test_exitcode {
Begin { Write-Host "Executing Command: $fun $args" }

Process {
$p = Start-Process "$fun" -ArgumentList "$args" -Wait -NoNewWindow -PassThru
If ( $($p.ExitCode) -ne 0) {
Write-Error "$descr returned exitcode $($p.ExitCode). "
exit $($p.ExitCode)
$p = Start-Process "$fun" -ArgumentList "$args" -Wait -PassThru
If ($p.ExitCode -ne 0) {
Write-Error "$descr returned exitcode $p.ExitCode."
exit $p.ExitCode
}
}

Expand Down