공개 런타임 빌드 종료 판정을 보강
This commit is contained in:
parent
471eb9621a
commit
44b7835ce3
2 changed files with 84 additions and 2 deletions
|
|
@ -1574,6 +1574,10 @@ if (!$SkipWebRestart) {
|
|||
-WorkingDirectory $WebDir `
|
||||
-NoNewWindow `
|
||||
-PassThru
|
||||
# Windows PowerShell 5.1의 Start-Process -PassThru는 Process.Handle을 먼저
|
||||
# 열지 않으면 timed WaitForExit 뒤에도 ExitCode가 $null로 남을 수 있다.
|
||||
# 성공한 빌드를 실패로 오판하지 않도록 핸들을 대기 전에 확보한다.
|
||||
$null = $build.Handle
|
||||
if (-not $build.WaitForExit($WebBuildTimeoutSeconds * 1000)) {
|
||||
$null = @(
|
||||
Stop-ProcessTreeBounded `
|
||||
|
|
@ -1584,6 +1588,9 @@ if (!$SkipWebRestart) {
|
|||
throw "Web build timed out after $WebBuildTimeoutSeconds seconds"
|
||||
}
|
||||
$build.Refresh()
|
||||
if ($null -eq $build.ExitCode) {
|
||||
throw "Web build exit code is unavailable"
|
||||
}
|
||||
if ($build.ExitCode -ne 0) {
|
||||
throw "Web build failed with exit code $($build.ExitCode)"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue