mirror of
https://github.com/microsoft/setup-msbuild.git
synced 2024-11-22 03:21:08 +07:00
Fixes #104 reassigning input arg [skip ci]
This commit is contained in:
parent
0b93bd95fc
commit
0a09b7fae9
6
dist/index.js
vendored
6
dist/index.js
vendored
@ -1652,7 +1652,7 @@ const IS_WINDOWS = process.platform === 'win32';
|
|||||||
const VS_VERSION = core.getInput('vs-version') || 'latest';
|
const VS_VERSION = core.getInput('vs-version') || 'latest';
|
||||||
const VSWHERE_PATH = core.getInput('vswhere-path');
|
const VSWHERE_PATH = core.getInput('vswhere-path');
|
||||||
const ALLOW_PRERELEASE = core.getInput('vs-prerelease') || 'false';
|
const ALLOW_PRERELEASE = core.getInput('vs-prerelease') || 'false';
|
||||||
const MSBUILD_ARCH = core.getInput('msbuild-architecture') || 'x86';
|
let MSBUILD_ARCH = core.getInput('msbuild-architecture') || 'x86';
|
||||||
// if a specific version of VS is requested
|
// if a specific version of VS is requested
|
||||||
let VSWHERE_EXEC = '-products * -requires Microsoft.Component.MSBuild -property installationPath -latest ';
|
let VSWHERE_EXEC = '-products * -requires Microsoft.Component.MSBuild -property installationPath -latest ';
|
||||||
if (ALLOW_PRERELEASE === 'true') {
|
if (ALLOW_PRERELEASE === 'true') {
|
||||||
@ -1703,6 +1703,10 @@ function run() {
|
|||||||
core.debug(`Found installation path: ${installationPath}`);
|
core.debug(`Found installation path: ${installationPath}`);
|
||||||
// x64 and arm64 only exist in one possible location, so no fallback probing
|
// x64 and arm64 only exist in one possible location, so no fallback probing
|
||||||
if (MSBUILD_ARCH === 'x64' || MSBUILD_ARCH === 'arm64') {
|
if (MSBUILD_ARCH === 'x64' || MSBUILD_ARCH === 'arm64') {
|
||||||
|
// x64 is actually amd64 so change to that
|
||||||
|
if (MSBUILD_ARCH === 'x64') {
|
||||||
|
MSBUILD_ARCH = 'amd64';
|
||||||
|
}
|
||||||
let toolPath = path.join(installationPath, `MSBuild\\Current\\Bin\\${MSBUILD_ARCH}\\MSBuild.exe`);
|
let toolPath = path.join(installationPath, `MSBuild\\Current\\Bin\\${MSBUILD_ARCH}\\MSBuild.exe`);
|
||||||
core.debug(`Checking for path: ${toolPath}`);
|
core.debug(`Checking for path: ${toolPath}`);
|
||||||
if (!fs.existsSync(toolPath)) {
|
if (!fs.existsSync(toolPath)) {
|
||||||
|
@ -9,7 +9,7 @@ const IS_WINDOWS = process.platform === 'win32'
|
|||||||
const VS_VERSION = core.getInput('vs-version') || 'latest'
|
const VS_VERSION = core.getInput('vs-version') || 'latest'
|
||||||
const VSWHERE_PATH = core.getInput('vswhere-path')
|
const VSWHERE_PATH = core.getInput('vswhere-path')
|
||||||
const ALLOW_PRERELEASE = core.getInput('vs-prerelease') || 'false'
|
const ALLOW_PRERELEASE = core.getInput('vs-prerelease') || 'false'
|
||||||
const MSBUILD_ARCH = core.getInput('msbuild-architecture') || 'x86'
|
let MSBUILD_ARCH = core.getInput('msbuild-architecture') || 'x86'
|
||||||
|
|
||||||
// if a specific version of VS is requested
|
// if a specific version of VS is requested
|
||||||
let VSWHERE_EXEC = '-products * -requires Microsoft.Component.MSBuild -property installationPath -latest '
|
let VSWHERE_EXEC = '-products * -requires Microsoft.Component.MSBuild -property installationPath -latest '
|
||||||
@ -73,6 +73,10 @@ async function run(): Promise<void> {
|
|||||||
|
|
||||||
// x64 and arm64 only exist in one possible location, so no fallback probing
|
// x64 and arm64 only exist in one possible location, so no fallback probing
|
||||||
if (MSBUILD_ARCH === 'x64' || MSBUILD_ARCH === 'arm64') {
|
if (MSBUILD_ARCH === 'x64' || MSBUILD_ARCH === 'arm64') {
|
||||||
|
// x64 is actually amd64 so change to that
|
||||||
|
if (MSBUILD_ARCH === 'x64') {
|
||||||
|
MSBUILD_ARCH = 'amd64'
|
||||||
|
}
|
||||||
let toolPath = path.join(
|
let toolPath = path.join(
|
||||||
installationPath,
|
installationPath,
|
||||||
`MSBuild\\Current\\Bin\\${MSBUILD_ARCH}\\MSBuild.exe`
|
`MSBuild\\Current\\Bin\\${MSBUILD_ARCH}\\MSBuild.exe`
|
||||||
|
Loading…
Reference in New Issue
Block a user