Skip to content

Commit 4dfff73

Browse files
iSazonovadityapatwardhan
authored andcommitted
Build: Fix a check to avoid null argument in case 'vcvarsall.bat' is absent (#7218) (#5)
1 parent efba759 commit 4dfff73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ function Start-BuildNativeWindowsBinaries {
261261
$vcvarsallbatPath = $vcvarsallbatPathVS2017
262262
}
263263

264-
if ((Test-Path -Path $vcvarsallbatPath) -eq $false) {
264+
if ([string]::IsNullOrEmpty($vcvarsallbatPath) -or (Test-Path -Path $vcvarsallbatPath) -eq $false) {
265265
throw "Could not find Visual Studio vcvarsall.bat at $vcvarsallbatPath. Please ensure the optional feature 'Common Tools for Visual C++' is installed."
266266
}
267267

0 commit comments

Comments
 (0)