diff --git a/dist/index.js b/dist/index.js index 1efbb37..a42ab73 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1910,12 +1910,12 @@ const VS_VERSION = core.getInput('vs-version') || 'latest'; const VSWHERE_PATH = core.getInput('vswhere-path') || path.join(process.env['ProgramFiles(x86)'], 'Microsoft Visual Studio\\Installer'); // 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 '; if (VS_VERSION === 'latest') { VSWHERE_EXEC += '-latest '; } else { - VSWHERE_EXEC += `-version ${VS_VERSION} `; + VSWHERE_EXEC += `-version "${VS_VERSION}" `; } core.debug(`Execution arguments: ${VSWHERE_EXEC}`); function run() { diff --git a/src/main.ts b/src/main.ts index 7b140a0..3a02a5e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -16,11 +16,11 @@ const VSWHERE_PATH = // if a specific version of VS is requested let VSWHERE_EXEC = - '-products * -requires Microsoft.Component.MSBuild -property installationPath' + '-products * -requires Microsoft.Component.MSBuild -property installationPath ' if (VS_VERSION === 'latest') { VSWHERE_EXEC += '-latest ' } else { - VSWHERE_EXEC += `-version ${VS_VERSION} ` + VSWHERE_EXEC += `-version "${VS_VERSION}" ` } core.debug(`Execution arguments: ${VSWHERE_EXEC}`)