Fix getWindowsSDK.ps1 error when $path is $null

This commit is contained in:
Alexander Karatarakis 2017-10-16 17:02:59 -07:00
parent 374253cb1b
commit e8f64049cf
1 changed files with 10 additions and 0 deletions

View File

@ -19,6 +19,11 @@ $validInstances = New-Object System.Collections.ArrayList
# Windows 10 SDK
function CheckWindows10SDK($path)
{
if ($path -eq $null)
{
return
}
$folder = (Join-Path $path "Include")
if (!(Test-Path $folder))
{
@ -64,6 +69,11 @@ CheckWindows10SDK("${env:ProgramFiles(x86)}\Windows Kits\10")
# Windows 8.1 SDK
function CheckWindows81SDK($path)
{
if ($path -eq $null)
{
return
}
$folder = "$path\Include"
if (!(Test-Path $folder))
{