Skip to content

Commit 599bb99

Browse files
Fix CI build 4
1 parent 34b93bb commit 599bb99

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

build.psm1

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,14 +295,16 @@ function Start-BuildNativeWindowsBinaries {
295295
Write-Verbose -Verbose "checking 2017 path"
296296
$vcvarsallbatPathVS2017 = ( Get-ChildItem $alternateVCPath -Filter vcvarsall.bat -Recurse -File -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty FullName)
297297
Write-Vebose -Verbose "vcvarsallbatPathVS2017: $vcvarsallbatPathVS2017"
298-
}
299298

300-
if(Test-Path $vcvarsallbatPathVS2017)
301-
{
302-
# prefer VS2017 path
303-
$vcvarsallbatPath = $vcvarsallbatPathVS2017
299+
if(Test-Path $vcvarsallbatPathVS2017)
300+
{
301+
# prefer VS2017 path
302+
$vcvarsallbatPath = $vcvarsallbatPathVS2017
303+
}
304304
}
305305

306+
Write-Verbose -Verbose "Checking if we found vcvarsall.bat"
307+
306308
if ([string]::IsNullOrEmpty($vcvarsallbatPath) -or (Test-Path -Path $vcvarsallbatPath) -eq $false) {
307309
throw "Could not find Visual Studio vcvarsall.bat at $vcvarsallbatPath. Please ensure the optional feature 'Common Tools for Visual C++' is installed."
308310
}

0 commit comments

Comments
 (0)