mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 19:25:01 +00:00
fix: actually support vswhere not finding something (#4682)
By default vswhere returns a non-zero error code making our error handling fail
This commit is contained in:
committed by
GitHub
parent
14dba5457c
commit
fb24fd22e5
@@ -183,13 +183,17 @@ function VSX
|
||||
|
||||
$versionSearchStr = "[$VS_VER.0," + ($VS_VER+1) + ".0)"
|
||||
|
||||
$ErrorActionPreference="SilentlyContinue"
|
||||
$VSInstallPath = & $VSWherePath -version $versionSearchStr -property installationPath $VS_PRE
|
||||
$ErrorActionPreference="Stop"
|
||||
|
||||
Write-Diagnostic "$($VS_OFFICIAL_VER)InstallPath: $VSInstallPath"
|
||||
|
||||
if( -not $VSInstallPath -or -not (Test-Path $VSInstallPath))
|
||||
{
|
||||
$ErrorActionPreference="SilentlyContinue"
|
||||
$VSInstallPath = & $VSwherePath -version $versionSearchStr -property installationPath $VS_PRE -products 'Microsoft.VisualStudio.Product.BuildTools'
|
||||
$ErrorActionPreference="Stop"
|
||||
Write-Diagnostic "BuildTools $($VS_OFFICIAL_VER)InstallPath: $VSInstallPath"
|
||||
|
||||
if( -not $VSInstallPath -or -not (Test-Path $VSInstallPath))
|
||||
|
||||
Reference in New Issue
Block a user