diff --git a/PSDepend/Public/Get-Dependency.ps1 b/PSDepend/Public/Get-Dependency.ps1 index f9784db..766205c 100644 --- a/PSDepend/Public/Get-Dependency.ps1 +++ b/PSDepend/Public/Get-Dependency.ps1 @@ -383,7 +383,7 @@ function Get-Dependency { } } } - } + } # Helper to retrieve the credential for a dependency function Resolve-Credential { @@ -393,7 +393,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]