diff --git a/dist/index.js b/dist/index.js index ea5c4a9..8ff2ee4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -59921,7 +59921,7 @@ async function setupMSWin() { * adds a convenience VCVARS environment variable * this assumes a single Visual Studio version being available in the Windows images */ function addVCVARSEnv() { - let cmd = `pwsh.exe -command "Get-VSSetupInstance -All | Select-VSSetupInstance -Latest | Select-Object -ExpandProperty InstallationPath"` + let cmd = 'vswhere -latest -property installationPath' let vcVars = `${cp.execSync(cmd).toString().trim()}\\VC\\Auxiliary\\Build\\vcvars64.bat` if (!fs.existsSync(vcVars)) { diff --git a/windows.js b/windows.js index 7de7d8d..da9fd2b 100644 --- a/windows.js +++ b/windows.js @@ -199,7 +199,7 @@ async function setupMSWin() { * adds a convenience VCVARS environment variable * this assumes a single Visual Studio version being available in the Windows images */ export function addVCVARSEnv() { - let cmd = `pwsh.exe -command "Get-VSSetupInstance -All | Select-VSSetupInstance -Latest | Select-Object -ExpandProperty InstallationPath"` + let cmd = 'vswhere -latest -property installationPath' let vcVars = `${cp.execSync(cmd).toString().trim()}\\VC\\Auxiliary\\Build\\vcvars64.bat` if (!fs.existsSync(vcVars)) {