diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2018-02-01 17:36:59 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2018-02-06 15:36:16 -0800 |
| commit | c9d434dfbc985be918295cabe7b37fae7732b9c8 (patch) | |
| tree | 91aa262cff7082e0589cfc766c8979c536f6ad82 /scripts | |
| parent | 3ccb391c34a21ac9cc323cb935c104ae26d5dc54 (diff) | |
| download | vcpkg-c9d434dfbc985be918295cabe7b37fae7732b9c8.tar.gz vcpkg-c9d434dfbc985be918295cabe7b37fae7732b9c8.zip | |
vcpkgRemoveItem: nullcheck
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/VcpkgPowershellUtils.ps1 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 4aaad3479..07270dd22 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -27,6 +27,11 @@ function vcpkgCreateParentDirectoryIfNotExists([Parameter(Mandatory=$true)][stri function vcpkgRemoveItem([Parameter(Mandatory=$true)][string]$dirPath) { + if ([string]::IsNullOrEmpty($dirPath)) + { + return + } + if (Test-Path $dirPath) { Remove-Item $dirPath -Recurse -Force |
