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 1/2] 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] From 7bb692f5d09f913d22f06b5c247004436b80f601 Mon Sep 17 00:00:00 2001 From: Gilbert Sanchez Date: Sun, 10 May 2026 19:26:56 -0700 Subject: [PATCH 2/2] Fix indentation in Get-Dependency.ps1 --- PSDepend/Public/Get-Dependency.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/PSDepend/Public/Get-Dependency.ps1 b/PSDepend/Public/Get-Dependency.ps1 index 4a52a0f..766205c 100644 --- a/PSDepend/Public/Get-Dependency.ps1 +++ b/PSDepend/Public/Get-Dependency.ps1 @@ -383,6 +383,7 @@ function Get-Dependency { } } } + } # Helper to retrieve the credential for a dependency function Resolve-Credential {