Skip to content

Commit

Permalink
fix: correctly check for closest next version instead of latest
Browse files Browse the repository at this point in the history
  • Loading branch information
Machine-Maker committed Apr 5, 2024
1 parent 9960184 commit b62c531
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ abstract class UpdateVersion : DefaultTask() {
val nextVersion = run {
val currentVersionIndex = mcManifest.versions.indexOf(latestExistingVersion)
val nextVersionIndex = mcManifest.versions.withIndex()
.indexOfFirst { (idx, version) ->
.indexOfLast { (idx, version) ->
idx < currentVersionIndex && (!type.isPresent || version.type == type.get())
}
if (nextVersionIndex < 0) {
Expand Down

0 comments on commit b62c531

Please sign in to comment.