mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 22:44:20 +02:00
Windows mswin - use vsWhere instead of vssetup.powershell (much faster)
This commit is contained in:
+1
-1
@@ -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
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user