From 808485b7a19fb2031c50b086142173f5dd947a4c Mon Sep 17 00:00:00 2001 From: "rmiller@nordex-online.com" Date: Thu, 25 Jul 2019 07:28:44 +0200 Subject: [PATCH] Adding check for empty string as well as null --- PSDepend/Public/Get-Dependency.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSDepend/Public/Get-Dependency.ps1 b/PSDepend/Public/Get-Dependency.ps1 index 3372f5a..3012917 100644 --- a/PSDepend/Public/Get-Dependency.ps1 +++ b/PSDepend/Public/Get-Dependency.ps1 @@ -427,7 +427,7 @@ function Get-Dependency { ) $credential = $null - if (($null -ne $Name) -and ($null -ne $Credentials)) { + if (![string]::IsNullOrEmpty($Name) -and ($null -ne $Credentials)) { if ($Credentials.ContainsKey($Name)) { $credential = $Credentials[$Name]