Skip to content

Commit

Permalink
in case 2 unmangaed platform are found, pick the newest one
Browse files Browse the repository at this point in the history
  • Loading branch information
alessio-perugini committed Dec 22, 2023
1 parent c40b060 commit bce1684
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/arduino/cores/packagemanager/package_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,12 @@ func (pme *Explorer) GetInstalledPlatformRelease(platform *cores.Platform) *core
for _, candidate := range releases[1:] {
candidateIsManaged := pme.IsManagedPlatformRelease(candidate)
debug("candidate", candidate)
if !candidateIsManaged && !bestIsManaged {
if candidate.Version.GreaterThan(best.Version) {
best = candidate
}
continue
}
if !candidateIsManaged {
continue
}
Expand Down

0 comments on commit bce1684

Please sign in to comment.