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

fix: resolve plugin crash when using nightly biome releases #112

Merged
merged 1 commit into from
Dec 22, 2024
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,11 @@ class BiomePackage(private val project: Project) {

fun compareVersion(version1: String,
version2: String): Int {
val parts1 = version1.split(".").map { it.toInt() }
val parts2 = version2.split(".").map { it.toInt() }
// standardize nightly versions like 1.9.5-nightly.81fdedb to 1.9.5
val cleanVersion1 = version1.split("-").first()
val cleanVersion2 = version2.split("-").first()
val parts1 = cleanVersion1.split(".").map { it.toInt() }
val parts2 = cleanVersion2.split(".").map { it.toInt() }

val maxLength = maxOf(parts1.size, parts2.size)

Expand Down
Loading