diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-10-16 17:02:59 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-10-16 17:02:59 -0700 |
| commit | e8f64049cf5d4b2f1b76bab49d5134bdd0dff1ea (patch) | |
| tree | 07cbc9231985ede4ccbb46eed9b28e28e800b729 | |
| parent | 374253cb1b12a60925693130132f1a6ab6c3a83a (diff) | |
| download | vcpkg-e8f64049cf5d4b2f1b76bab49d5134bdd0dff1ea.tar.gz vcpkg-e8f64049cf5d4b2f1b76bab49d5134bdd0dff1ea.zip | |
Fix getWindowsSDK.ps1 error when $path is $null
| -rw-r--r-- | scripts/getWindowsSDK.ps1 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/getWindowsSDK.ps1 b/scripts/getWindowsSDK.ps1 index 8ef26a436..ed2fd11c7 100644 --- a/scripts/getWindowsSDK.ps1 +++ b/scripts/getWindowsSDK.ps1 @@ -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)) { |
