Skip to content

Commit 8c72644

Browse files
MSP-Gregeregon
authored andcommitted
Windows mswin - use vsWhere instead of vssetup.powershell (much faster)
1 parent d02b65e commit 8c72644

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

windows.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ async function setupMSWin() {
199199
* adds a convenience VCVARS environment variable
200200
* this assumes a single Visual Studio version being available in the Windows images */
201201
export function addVCVARSEnv() {
202-
let cmd = `pwsh.exe -command "Get-VSSetupInstance -All | Select-VSSetupInstance -Latest | Select-Object -ExpandProperty InstallationPath"`
202+
let cmd = 'vswhere -latest -property installationPath'
203203
let vcVars = `${cp.execSync(cmd).toString().trim()}\\VC\\Auxiliary\\Build\\vcvars64.bat`
204204

205205
if (!fs.existsSync(vcVars)) {

0 commit comments

Comments
 (0)