From 66b8b2f76d457ac50778a3d363183fe6d2fd063b Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Sun, 13 Aug 2017 14:20:37 -0400 Subject: [PATCH] win,build: bump vswhere_usability_wrapper to 2.0.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/libuv/libuv/pull/1479 Fixes: https://github.com/nodejs/libuv/issues/1476 Reviewed-By: Saúl Ibarra Corretgé Reviewed-By: Bartosz Sosnowski --- tools/vswhere_usability_wrapper.cmd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/vswhere_usability_wrapper.cmd b/tools/vswhere_usability_wrapper.cmd index e4acf03e..ee0549c8 100644 --- a/tools/vswhere_usability_wrapper.cmd +++ b/tools/vswhere_usability_wrapper.cmd @@ -2,23 +2,23 @@ :: Distributed under MIT style license or the libuv license :: See accompanying file LICENSE at https://github.com/node4good/windows-autoconf :: or libuv LICENSE file at https://github.com/libuv/libuv -:: version: 1.15.3 +:: version: 2.0.0 @if not defined DEBUG_HELPER @ECHO OFF setlocal +if "%~1"=="prerelease" set VSWHERE_WITH_PRERELEASE=1 set "InstallerPath=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer" if not exist "%InstallerPath%" set "InstallerPath=%ProgramFiles%\Microsoft Visual Studio\Installer" -if not exist "%InstallerPath%" exit goto :no-vswhere +if not exist "%InstallerPath%" goto :no-vswhere :: Manipulate %Path% for easier " handeling -set Path=%Path%;%InstallerPath% +set "Path=%Path%;%InstallerPath%" where vswhere 2> nul > nul if errorlevel 1 goto :no-vswhere set VSWHERE_REQ=-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 set VSWHERE_PRP=-property installationPath set VSWHERE_LMT=-version "[15.0,16.0)" vswhere -prerelease > nul -if "%~1"=="prerelase" set VSWHERE_WITH_PRERELASE=1 -if not errorlevel 1 if "%VSWHERE_WITH_PRERELASE%"=="1" set "VSWHERE_LMT=%VSWHERE_LMT% -prerelease" +if not errorlevel 1 if "%VSWHERE_WITH_PRERELEASE%"=="1" set "VSWHERE_LMT=%VSWHERE_LMT% -prerelease" SET VSWHERE_ARGS=-latest -products * %VSWHERE_REQ% %VSWHERE_PRP% %VSWHERE_LMT% for /f "usebackq tokens=*" %%i in (`vswhere %VSWHERE_ARGS%`) do ( endlocal