Skip to content

Commit

Permalink
[build.ps1] Early return error if autorest fails (#15179)
Browse files Browse the repository at this point in the history
  • Loading branch information
chamons authored Jul 29, 2021
1 parent d605899 commit 44ce3f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions eng/scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ function Process-Sdk ($path) {
$outputFolder = $path
}
autorest --use=$autorestVersion --go --track2 --go-sdk-folder=$root --output-folder=$outputFolder --file-prefix="zz_generated_" --clear-output-folder=false $autorestPath
if ($LASTEXITCODE) {
Write-Host "##[error]Error running autorest.go"
exit $LASTEXITCODE
}
if ($removeAutorestFile) {
Remove-Item $autorestPath
}
Expand Down

0 comments on commit 44ce3f7

Please sign in to comment.