Fixes unhandled $null directory value on Test-IcingaAcl

This commit is contained in:
Lord Hepipud 2020-06-02 15:51:01 +02:00
parent 86b280eb72
commit 152a088fe0

View file

@ -5,7 +5,7 @@ function Test-IcingaAcl()
[switch]$WriteOutput
);
if (-Not (Test-Path $Directory)) {
if ([string]::IsNullOrEmpty($Directory) -Or -Not (Test-Path $Directory)) {
throw 'The specified directory was not found';
}