Skip to content

Commit 0a09b7f

Browse files
committed
Fixes #104 reassigning input arg [skip ci]
1 parent 0b93bd9 commit 0a09b7f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

dist/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1652,7 +1652,7 @@ const IS_WINDOWS = process.platform === 'win32';
16521652
const VS_VERSION = core.getInput('vs-version') || 'latest';
16531653
const VSWHERE_PATH = core.getInput('vswhere-path');
16541654
const ALLOW_PRERELEASE = core.getInput('vs-prerelease') || 'false';
1655-
const MSBUILD_ARCH = core.getInput('msbuild-architecture') || 'x86';
1655+
let MSBUILD_ARCH = core.getInput('msbuild-architecture') || 'x86';
16561656
// if a specific version of VS is requested
16571657
let VSWHERE_EXEC = '-products * -requires Microsoft.Component.MSBuild -property installationPath -latest ';
16581658
if (ALLOW_PRERELEASE === 'true') {
@@ -1703,6 +1703,10 @@ function run() {
17031703
core.debug(`Found installation path: ${installationPath}`);
17041704
// x64 and arm64 only exist in one possible location, so no fallback probing
17051705
if (MSBUILD_ARCH === 'x64' || MSBUILD_ARCH === 'arm64') {
1706+
// x64 is actually amd64 so change to that
1707+
if (MSBUILD_ARCH === 'x64') {
1708+
MSBUILD_ARCH = 'amd64';
1709+
}
17061710
let toolPath = path.join(installationPath, `MSBuild\\Current\\Bin\\${MSBUILD_ARCH}\\MSBuild.exe`);
17071711
core.debug(`Checking for path: ${toolPath}`);
17081712
if (!fs.existsSync(toolPath)) {

src/main.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const IS_WINDOWS = process.platform === 'win32'
99
const VS_VERSION = core.getInput('vs-version') || 'latest'
1010
const VSWHERE_PATH = core.getInput('vswhere-path')
1111
const ALLOW_PRERELEASE = core.getInput('vs-prerelease') || 'false'
12-
const MSBUILD_ARCH = core.getInput('msbuild-architecture') || 'x86'
12+
let MSBUILD_ARCH = core.getInput('msbuild-architecture') || 'x86'
1313

1414
// if a specific version of VS is requested
1515
let VSWHERE_EXEC = '-products * -requires Microsoft.Component.MSBuild -property installationPath -latest '
@@ -73,6 +73,10 @@ async function run(): Promise<void> {
7373

7474
// x64 and arm64 only exist in one possible location, so no fallback probing
7575
if (MSBUILD_ARCH === 'x64' || MSBUILD_ARCH === 'arm64') {
76+
// x64 is actually amd64 so change to that
77+
if (MSBUILD_ARCH === 'x64') {
78+
MSBUILD_ARCH = 'amd64'
79+
}
7680
let toolPath = path.join(
7781
installationPath,
7882
`MSBuild\\Current\\Bin\\${MSBUILD_ARCH}\\MSBuild.exe`

0 commit comments

Comments
 (0)