Skip to content

Commit 6bafe04

Browse files
bingenitoBethGriggs
authored andcommittedDec 15, 2020
build: conditionally clear vcinstalldir
For scenario where target env is explicitly specified as vs2019, do not clear VCINSTALLDIR which was being cleared to handle fallback to vs2017 block when attempting to find a matching available VS. Fixes: #35856 PR-URL: #36009 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 3029872 commit 6bafe04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎vcbuild.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ echo Looking for Visual Studio 2019
248248
@rem VCINSTALLDIR may be set if run from a VS Command Prompt and needs to be
249249
@rem cleared first as vswhere_usability_wrapper.cmd doesn't when it fails to
250250
@rem detect the version searched for
251-
set "VCINSTALLDIR="
251+
if not defined target_env set "VCINSTALLDIR="
252252
call tools\msvs\vswhere_usability_wrapper.cmd "[16.0,17.0)"
253253
if "_%VCINSTALLDIR%_" == "__" goto vs-set-2017
254254
set "WIXSDKDIR=%WIX%\SDK\VS2017"

0 commit comments

Comments
 (0)
Please sign in to comment.