Unverified Commit 1f2fdc95 authored by Richard Lau's avatar Richard Lau
Browse files

build: fix detection of Visual Studio 2017

When run in a Visual Studio 2017 command prompt the `VCINSTALLDIR`
environment variable will be already set and is not cleared by the
`tools/msvs/vswhere_usability_wrapper.cmd` utility when it fails to
find Visual Studio 2019. This causes `vcbuild.bat` to incorrectly
assume Visual Studio 2019 and generate an incompatible configuration.

Clearing the value of `VCINSTALLDIR` before calling the utility fixes
the detection logic.

PR-URL: https://github.com/nodejs/node/pull/30119
Fixes: https://github.com/nodejs/node/issues/30118
Refs: https://github.com/nodejs/node/pull/30022


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarMichaël Zasso <targos@protonmail.com>
Reviewed-By: default avatarJoão Reis <reis@janeasystems.com>
parent ed2c3ca6
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment