* Make build-test.cmd exit if init-tools.cmd fails
* Clear Platform variable before initializing BuildTools
REM =========================================================================================
call "%__ProjectDir%\init-tools.cmd"
+if NOT [%ERRORLEVEL%]==[0] (
+ exit /b %ERRORLEVEL%
+)
@if defined _echo @echo on
set "__ToolsDir=%__ProjectDir%\Tools"
@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