Windows mswin - use vsWhere instead of vssetup.powershell (much faster)

This commit is contained in:
MSP-Greg
2022-05-02 20:51:22 +02:00
committed by Benoit Daloze
parent d02b65e726
commit 8c72644a0b
2 changed files with 2 additions and 2 deletions
Generated Vendored
+1 -1
View File
@@ -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)) {
+1 -1
View File
@@ -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)) {