Abort on failed download(s)

* Fixes #29
This commit is contained in:
2Shirt 2018-05-17 16:26:07 -06:00
parent 598dea32c7
commit 223155b842
2 changed files with 2 additions and 2 deletions

View file

@ -34,7 +34,7 @@ function DownloadFile ($Path, $Name, $Url) {
} }
catch { catch {
Write-Host (" ERROR: Failed to download file." ) -ForegroundColor "Red" Write-Host (" ERROR: Failed to download file." ) -ForegroundColor "Red"
$DownloadErrors += 1 $global:DownloadErrors += 1
} }
} }
function FindDynamicUrl ($SourcePage, $RegEx) { function FindDynamicUrl ($SourcePage, $RegEx) {

View file

@ -70,7 +70,7 @@ function DownloadFile ($Path, $Name, $Url) {
} }
catch { catch {
Write-Host (" ERROR: Failed to download file." ) -ForegroundColor "Red" Write-Host (" ERROR: Failed to download file." ) -ForegroundColor "Red"
$DownloadErrors += 1 $global:DownloadErrors += 1
} }
} }
function FindDynamicUrl ($SourcePage, $RegEx) { function FindDynamicUrl ($SourcePage, $RegEx) {