I'm getting some errors from the semver parser when running
./utils/semver.sh: line 31: ((: 10#2.0.2 > 10#2.0.0: syntax error: invalid arithmetic operator (error token is ".0.2 > 10#2.0.0")
./utils/semver.sh: line 35: ((: 10#2.0.2 < 10#2.0.0: syntax error: invalid arithmetic operator (error token is ".0.2 < 10#2.0.0")
From a little debugging it seems the versions aren't getting split by the IFS value and the length of both values is 1. Looking at the original source it seems the parentheses are important to get the values to split.
I'm getting some errors from the semver parser when running
From a little debugging it seems the versions aren't getting split by the
IFS
value and the length of both values is 1. Looking at the original source it seems the parentheses are important to get the values to split.However, according to the shellcheck language server the safer way to parse the values is to use
read
https://github.com/koalaman/shellcheck/wiki/SC2206Happy to swap back to the original implementation if you prefer though as both seem to work!