From 323957b74e9586fb3fbfb2acad5040379c778de6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=BCseyin=20A=C3=A7acak?= <110401522+huseyinacacak-janea@users.noreply.github.com> Date: Tue, 23 Apr 2024 16:46:11 +0300 Subject: [PATCH] win: add an arch check to VS 2019 (#3025) --- lib/find-visualstudio.js | 6 +++++- test/test-find-visualstudio.js | 6 ------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/find-visualstudio.js b/lib/find-visualstudio.js index 8c5ae96127..a78e763480 100644 --- a/lib/find-visualstudio.js +++ b/lib/find-visualstudio.js @@ -363,7 +363,11 @@ class VisualStudioFinder { return path.join(info.path, 'MSBuild', '15.0', 'Bin', 'MSBuild.exe') } if (versionYear === 2019) { - return msbuildPath + if (process.arch === 'arm64' && this.msBuildPathExists(msbuildPathArm64)) { + return msbuildPathArm64 + } else { + return msbuildPath + } } } /** diff --git a/test/test-find-visualstudio.js b/test/test-find-visualstudio.js index 41dd837830..2c3f4e1981 100644 --- a/test/test-find-visualstudio.js +++ b/test/test-find-visualstudio.js @@ -21,13 +21,7 @@ class TestVisualStudioFinder extends VisualStudioFinder { } } -const shouldSkip = process.platform !== 'win32' - describe('find-visualstudio', function () { - if (shouldSkip) { - return - } - this.beforeAll(function () { // Condition to skip the test suite if (process.env.SystemRoot === undefined) {