Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose the highest version of a platform if a loose name was given #19

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
WIP
timsutton committed Nov 20, 2023
commit db917f33fa25a5ee6e612a3ba145bcb67e380196
6 changes: 6 additions & 0 deletions cmd/download.go
Original file line number Diff line number Diff line change
@@ -106,6 +106,12 @@ func findMatchingRuntime(runtimeName string, data util.DVTDownloadablePlist) (st
}
}

// TODO: If there's 'Simulator' somewhere in the provided name, just try and match an exact slice elem
// and bypass the
// if strings.Contains(runtimeName, "Simulator") {

// }

// If there are multiple matches, take the highest-versioned one
if len(matchingRuntimes) > 1 {
slices.SortFunc(matchingRuntimes, func(a, b util.PlatformDownloadable) int {