Closed christianacca closed 6 years ago
I have identified the problematic code.
I've implemented a solution (see PR https://github.com/RamblingCookieMonster/PSDepend/pull/52) so that Find-Module
is called only when a dependency specifies 'latest' as it's required version.
Note...
This solution also applies to using Invoke-PSDepend -Install
when a module(s) is already installed:
Previously, calls to a PS repository were always made. Now they're made only for those dependencies that specify 'latest' as their required version
Merged #52 a while back, thanks again for the contribution!
Consider the following
requirements.psd1
After running
Invoke-PSDepend requirements.psd1 -Install
, I see the single module_LibraryTest1
locally on the file system - great... butRunning
Invoke-PSDepend requirements.psd1 -Import
still results in 5 requests to www.powershellgallery.comThat is very unexpected and problematic:
Is there a reason why these requests to the gallery have to be made?
What code should be changed to remove the calls to psgallery (I had a little browse but couldn't pinpoint the spot)
Thanks Christian