From 152a088fe02660a5ab3f01cdb131828bb4908053 Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Tue, 2 Jun 2020 15:51:01 +0200 Subject: [PATCH] Fixes unhandled $null directory value on Test-IcingaAcl --- lib/core/icingaagent/tests/Test-IcingaAcl.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/icingaagent/tests/Test-IcingaAcl.psm1 b/lib/core/icingaagent/tests/Test-IcingaAcl.psm1 index 68a950e..dacab73 100644 --- a/lib/core/icingaagent/tests/Test-IcingaAcl.psm1 +++ b/lib/core/icingaagent/tests/Test-IcingaAcl.psm1 @@ -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'; }