Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Build/git-repo.ps1: fix exit code checking
Browse files Browse the repository at this point in the history
  • Loading branch information
abock committed Dec 22, 2017
1 parent 9805339 commit 7f3bf81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Build/git-repo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ function CloneOrUpdate {

Push-Location $checkoutPath
try {
if (-Not (& git checkout $gitRef)) {
& git checkout $gitRef
if ($LASTEXITCODE -ne 0) {
Write-Error "Unable to check out $gitRef"
Exit 1
}
Expand Down

0 comments on commit 7f3bf81

Please sign in to comment.