From 6991487a3c9803da9f4d894458331970b9faa63b Mon Sep 17 00:00:00 2001 From: OCram85 Date: Fri, 9 Mar 2018 09:31:43 +0100 Subject: [PATCH] fix Resolve-Dependency error for missing module --- src/Helper/Resolve-Dependency.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Helper/Resolve-Dependency.ps1 b/src/Helper/Resolve-Dependency.ps1 index 59cfc5f..5152623 100644 --- a/src/Helper/Resolve-Dependency.ps1 +++ b/src/Helper/Resolve-Dependency.ps1 @@ -75,7 +75,10 @@ function Resolve-Dependency { foreach ($Module in $SelectedDependency.Modules) { $res += Test-Module -Name $Module } - if ($res -contains $false) { + if ($res.count -eq 0) { + return $false + } + elseif ($res.count -contains $false) { return $false } else {