Open tnguyen42 opened 1 year ago
@tnguyen42 Hi! When I reinvented Solidarity in Bash yesterday, I have noticed, that semver
binary do not correctly understand version number containing only major or major and minor version numbers. You need to provide full SemVer pattern (x.x.x) like >=11.0.0 <12.0.0
.
{
"rule": "cli",
"binary": "java",
"semver": ">=11.0.0 <12.0.0",
"error": "You have java@{{installedVersion}}. Fix with `sdk install java {{wantedVersion}} && sdk use java {{wantedVersion}}`. More info https://sdkman.io/install"
}
semver "14.3" -r ">=13.0.0"
vs semver "14.3" -c -r ">=13.0.0"
will have different result
-c --coerce Coerce a string into SemVer if possible (does not imply --loose)
For some reason, using this configuration of java:
seems to work correctly for most Java version, but Solidarity doesn't identify Java 11.0.16 as a valid version. My guess is that the version isn't parsed correctly. Is this an easy fix?
Additional information: The output of
java --version
using this version is:While the output of
java --version
using 11.0.17 (which works) is: