From 1775d590ceff4cb9e46f45771a8419f56fc50103 Mon Sep 17 00:00:00 2001 From: PetSerAl Date: Mon, 2 Jul 2018 20:41:03 +0300 Subject: [PATCH] Build: Fix a check to avoid null argument in case 'vcvarsall.bat' is absent (#7218) --- build.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.psm1 b/build.psm1 index a4b5bcd..b988f58 100644 --- a/build.psm1 +++ b/build.psm1 @@ -261,7 +261,7 @@ function Start-BuildNativeWindowsBinaries { $vcvarsallbatPath = $vcvarsallbatPathVS2017 } - if ((Test-Path -Path $vcvarsallbatPath) -eq $false) { + if ([string]::IsNullOrEmpty($vcvarsallbatPath) -or (Test-Path -Path $vcvarsallbatPath) -eq $false) { throw "Could not find Visual Studio vcvarsall.bat at $vcvarsallbatPath. Please ensure the optional feature 'Common Tools for Visual C++' is installed." }