From 223155b8429fa5d5b8ec765c8d8d86c8bf9877a4 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Thu, 17 May 2018 16:26:07 -0600 Subject: [PATCH] Abort on failed download(s) * Fixes #29 --- .bin/Scripts/build_kit.ps1 | 2 +- .bin/Scripts/build_pe.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/build_kit.ps1 b/.bin/Scripts/build_kit.ps1 index 778c6bb8..25373389 100644 --- a/.bin/Scripts/build_kit.ps1 +++ b/.bin/Scripts/build_kit.ps1 @@ -34,7 +34,7 @@ function DownloadFile ($Path, $Name, $Url) { } catch { Write-Host (" ERROR: Failed to download file." ) -ForegroundColor "Red" - $DownloadErrors += 1 + $global:DownloadErrors += 1 } } function FindDynamicUrl ($SourcePage, $RegEx) { diff --git a/.bin/Scripts/build_pe.ps1 b/.bin/Scripts/build_pe.ps1 index a040a207..e5a92de3 100644 --- a/.bin/Scripts/build_pe.ps1 +++ b/.bin/Scripts/build_pe.ps1 @@ -70,7 +70,7 @@ function DownloadFile ($Path, $Name, $Url) { } catch { Write-Host (" ERROR: Failed to download file." ) -ForegroundColor "Red" - $DownloadErrors += 1 + $global:DownloadErrors += 1 } } function FindDynamicUrl ($SourcePage, $RegEx) {