1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 00:17:11 -07:00

Remove warning when failing to parse the version number.

Fixes https://github.com/cbeust/kobalt/issues/475
This commit is contained in:
Cedric Beust 2018-02-27 11:34:27 -08:00
parent c6b180dd71
commit 50b31114f6

View file

@ -29,10 +29,14 @@ class StringVersion(val version: String) : Comparable<StringVersion> {
if (v1 < v2) return -1
else if (v1 > v2) return 1
} catch(ex: NumberFormatException) {
warn("Couldn't parse version $version or $other")
if (version == other.toString()) {
return 0
} else {
log(2, "Couldn't parse version $version or $other")
return -1
}
}
}
return 0
}