From 531aa1d2f84c94b236ce1f761ece91ff94bca3c0 Mon Sep 17 00:00:00 2001 From: Elinor Fung Date: Wed, 5 Jun 2019 14:58:14 -0700 Subject: [PATCH 1/2] Make build-test.cmd exit if init-tools.cmd fails --- build-test.cmd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-test.cmd b/build-test.cmd index e1400c42d978..39c38d415e5f 100644 --- a/build-test.cmd +++ b/build-test.cmd @@ -166,6 +166,9 @@ REM === REM ========================================================================================= call "%__ProjectDir%\init-tools.cmd" +if NOT [%ERRORLEVEL%]==[0] ( + exit /b %ERRORLEVEL% +) @if defined _echo @echo on set "__ToolsDir=%__ProjectDir%\Tools" From 38b1621db9938fd891d415a401fa9356893b31f4 Mon Sep 17 00:00:00 2001 From: Elinor Fung Date: Wed, 5 Jun 2019 23:57:36 -0700 Subject: [PATCH 2/2] Clear Platform variable before initializing BuildTools --- init-tools.cmd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init-tools.cmd b/init-tools.cmd index 32634ece1208..0905e913b96c 100644 --- a/init-tools.cmd +++ b/init-tools.cmd @@ -1,6 +1,10 @@ @if not defined _echo @echo off setlocal +:: Clear the 'Platform' environment variable for this session +:: This avoids overriding the default value from BuildTools projects used for initialization +set Platform= + set INIT_TOOLS_LOG=%~dp0init-tools.log if [%PACKAGES_DIR%]==[] set PACKAGES_DIR=%~dp0.packages if [%TOOLRUNTIME_DIR%]==[] set TOOLRUNTIME_DIR=%~dp0Tools