You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ModuleFast.psm1
+31-4Lines changed: 31 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -330,10 +330,14 @@ function Get-ModuleFastPlan {
330
330
#We dont need this to be ConcurrentList because we only manipulate it in the "main" runspace.
331
331
[List[Task[String]]]$currentTasks=@()
332
332
333
+
333
334
#This try finally is so that we can interrupt all http call tasks if Ctrl-C is pressed
334
335
foreach ($moduleSpecin$ModulesToResolve) {
336
+
#This is used to track the highest candidate if -Update was specified to force a remote lookup. If the candidate is still the most valid after remote lookup we can skip it without hitting disk to read the manifest again.
@@ -1388,7 +1410,12 @@ function Find-LocalModule {
1388
1410
1389
1411
if ($ModuleSpec.SatisfiedBy($candidateVersion)) {
1390
1412
if ($Update-and ($ModuleSpec.Max-ne$candidateVersion)) {
1391
-
Write-Debug"${ModuleSpec}: Skipping $candidateVersion - The -Update was specified and the version does not exactly meet the upper bound of the spec, meaning there is a possible newer version remotely."
1413
+
Write-Debug"${ModuleSpec}: Skipping $candidateVersion because -Update was specified and the version does not exactly meet the upper bound of the spec or no upper bound was specified at all, meaning there is a possible newer version remotely."
1414
+
#We can use this ref later to find out if our best remote version matches what is installed without having to read the manifest again
1415
+
if ($BestCandidate-and$manifestCandidate.ModuleVersion-gt$bestCandidate.Value.ModuleVersion) {
1416
+
Write-Debug"${ModuleSpec}: New Best Candidate Version $($manifestCandidate.ModuleVersion)"
0 commit comments