From ecd2720e843eaddc1c895ae76a86188d69241e35 Mon Sep 17 00:00:00 2001 From: Jacob Alber Date: Thu, 2 May 2019 10:17:35 -0400 Subject: [PATCH] Bring set closer to check for envvars --- .scripts/init.cmd | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.scripts/init.cmd b/.scripts/init.cmd index ff7022ce72d..1c678e9cdac 100644 --- a/.scripts/init.cmd +++ b/.scripts/init.cmd @@ -12,20 +12,20 @@ IF NOT DEFINED vstestPath ( ) IF NOT DEFINED msbuildPath ( - IF NOT EXIST "%VsInstallDir%\MSBuild\15.0\Bin\MSBuild.exe" ( + IF EXIST "%VsInstallDir%\MSBuild\15.0\Bin\MSBuild.exe" ( + SET "msBuildPath=%VsInstallDir%\MSBuild\15.0\Bin\MSBuild.exe" + ) ELSE ( ECHO ERROR: MsBuild couldn't be found EXIT /b 1 - ) ELSE ( - SET "msBuildPath=%VsInstallDir%\MSBuild\15.0\Bin\MSBuild.exe" ) ) IF NOT DEFINED vstestPath ( - IF NOT EXIST "%VsInstallDir%\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" ( + IF EXIST "%VsInstallDir%\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" ( + SET "vstestPath=%VsInstallDir%\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" + ) ELSE ( ECHO ERROR: vstest.console couldn't be found EXIT /b 1 - ) ELSE ( - SET "vstestPath=%VsInstallDir%\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" ) )