Always use -latest

This commit is contained in:
James Clancey 2021-07-13 14:36:17 -08:00 committed by GitHub
parent 4917605713
commit 455ec54ae7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,14 +11,10 @@ const VSWHERE_PATH = core.getInput('vswhere-path')
const ALLOW_PRERELEASE = core.getInput('vs-prerelease') || 'false' const ALLOW_PRERELEASE = core.getInput('vs-prerelease') || 'false'
// 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 ' let VSWHERE_EXEC = '-products * -requires Microsoft.Component.MSBuild -property installationPath -latest '
if (ALLOW_PRERELEASE === 'true') { if (ALLOW_PRERELEASE === 'true') {
VSWHERE_EXEC += ' -prerelease ' VSWHERE_EXEC += ' -prerelease '
} }
else
{
VSWHERE_EXEC += ' -latest '
}
if (VS_VERSION !== 'latest') { if (VS_VERSION !== 'latest') {
VSWHERE_EXEC += `-version "${VS_VERSION}" ` VSWHERE_EXEC += `-version "${VS_VERSION}" `