diff --git a/build.ps1 b/build.ps1 index 8ef8d990..42541be8 100644 --- a/build.ps1 +++ b/build.ps1 @@ -24,6 +24,10 @@ param ( .\download.ps1 $OutputPath +if ( -Not $? ) { + Exit 1 +} + Write-Host "Building $Configuration to $OutputPath" dotnet publish ` -c $Configuration ` diff --git a/download.ps1 b/download.ps1 index 39afedb1..5375136a 100644 --- a/download.ps1 +++ b/download.ps1 @@ -46,6 +46,11 @@ function DownloadAndExtract { $TargetPath ) $json = Invoke-RestMethod "https://api.github.com/repos/$Owner/$Repo/git/refs/$ref" + + if ( -Not $? ) { + Exit 1; + } + $sha = $json.object.sha $archiveUrl = "https://github.com/$Owner/$Repo/archive/$sha.zip"