Skip to content

Commit f285bff

Browse files
authored
Merge pull request meteor#8544 from abernix/abernix/fix-windows-dev-bundle-extract-error
Detect dev_bundle download errors and fail appropriately on Windows.
2 parents 26544d6 + ab111e7 commit f285bff

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

meteor.bat

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ IF EXIST "%~dp0\.git" (
1616
REM need `< con` so that we can run this file from Node
1717
REM (See http://stackoverflow.com/questions/9155289/calling-powershell-from-nodejs)
1818
PowerShell.exe -executionpolicy ByPass -file "%~dp0\scripts\windows\download-dev-bundle.ps1" < con
19+
IF errorlevel 1 (
20+
echo An error occurred while obtaining the dev_bundle. Please try again.
21+
exit /b 1
22+
)
1923
)
2024

2125
rem if dev_bundle is the wrong version, remove it and get a new one
@@ -28,6 +32,10 @@ IF EXIST "%~dp0\.git" (
2832
exit /b 1
2933
)
3034
PowerShell.exe -executionpolicy ByPass -file "%~dp0\scripts\windows\download-dev-bundle.ps1" < con
35+
IF errorlevel 1 (
36+
echo An error occurred while obtaining the dev_bundle. Please try again.
37+
exit /b 1
38+
)
3139
)
3240

3341
rem Only set this when we're in a checkout. When running from a release,

scripts/windows/download-dev-bundle.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ if (Test-Path $devbundle_zip) {
4242
Write-Host "Extracting $TARBALL to the dev_bundle directory"
4343

4444
cmd /C "7z.exe x $devbundle_zip -so | 7z.exe x -aoa -si -ttar -o$CHECKOUT_DIR\dev_bundle_XXX" | out-null
45+
if ($LASTEXITCODE -ne 0) {
46+
Exit 1
47+
}
4548

4649
$downloaded_tmp = $CHECKOUT_DIR + "\dev_bundle_XXX"
4750
$downloaded_path = $downloaded_tmp + "\dev_bundle_" + $PLATFORM + "_" + $BUNDLE_VERSION

0 commit comments

Comments
 (0)