From b50c3b584064aa4237982bdc20d7dd49d1c9d299 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Fri, 15 Mar 2019 07:57:58 +0100 Subject: [PATCH] fix dependency test for conection types without deps --- src/Private/Resolve-Dependency.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Private/Resolve-Dependency.ps1 b/src/Private/Resolve-Dependency.ps1 index 23f026c..c0f6a0a 100644 --- a/src/Private/Resolve-Dependency.ps1 +++ b/src/Private/Resolve-Dependency.ps1 @@ -70,6 +70,11 @@ function Resolve-Dependency { process { $SelectedDependency = $Dependency.Optional | Where-Object {$_.Name -match $Name} + # return true if there is no dependency defined + if ($null -eq $SelectedDependency) { + return $true + } + $res = @() foreach ($Module in $SelectedDependency.Modules) { $res += Test-Module -Name $Module