Closed johlju closed 8 months ago
EDIT: Disregard, I missed where you said it happens when the package are already installed. I think dependencies are not getting evaluated the same as main packages. I'll investigate. Thanks!
VERBOSE: Plaster(1.1.4): Added to install plan
What if: Performing the operation "Install 2 Modules" on target "C:\Users\JGrote\AppData\Local\powershell\Modules".
Name ModuleVersion
---- -------------
Sampler 0.117.0
Plaster 1.1.4
This is what should be happening with Sampler when -Update is specified. I save off the best found candidate and if its already locally installed, skip it, and that evaluation should all happen in the plan but it isn't for some reason for that package even tho the versions match. I think it has something to do with your 0.117.0 version having leading or trailing zeroes and causing it to not match because it's being trimmed somewhere.
DEBUG: Sampler.GitHubTasks(0.3.4): ✅ -Update was specified and the best remote candidate matches what is locally installed, so we can skip this module.
Found the problem, I scoped my $BestCandidate incorrectly. I moved it to a map to a higher level and it will now work as expected, I will close this with the commit when I complete it, it kind of got lumped into other work.
Here is a strange issue. It returns the wrong modules. It does not return Sampler.GitHubTask but it returns Sampler and Plaster. (Sampler is dependent on Plaster). All of these are installed, so non should be returned.
Problem: