File tree Expand file tree Collapse file tree 1 file changed +1
-18
lines changed
Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -150,24 +150,7 @@ function Initialize-Dependencies {
150150 {
151151 Write-Verbose - Message (" Saving module {0} with version {1}..." -f $moduleSpec.Name , $moduleSpec.Version )
152152 $saveModuleCmdParamsClone = $saveModuleCmdParams.Clone ()
153- $isModulePresent = Get-Module - Name $moduleSpec.Name - ListAvailable - ErrorAction Ignore | Where-Object {
154- $isValid = $true
155- if ($moduleSpec.Guid )
156- {
157- $isValid = $_.Guid -eq $moduleSpec.Guid
158- }
159-
160- if ($moduleSpec.Version )
161- {
162- $isValid = $isValid -and $_.Version -ge [Version ]$moduleSpec.Version
163- }
164- elseif ($moduleSpec.RequiredVersion )
165- {
166- $isValid = $isValid -and $_.Version -eq [Version ]$moduleSpec.RequiredVersion
167- }
168-
169- $isValid
170- }
153+ $isModulePresent = Get-Module - FullyQualifiedName $moduleSpec - ListAvailable - ErrorAction Ignore
171154
172155 if ($isModulePresent )
173156 {
You can’t perform that action at this time.
0 commit comments