I've noticed an issue in the install.sh script, specifically in the grep statement. The current grep statement, 'grep -e "2."', matches any version number containing '2' plus any other character. This can lead to unintended matches, as illustrated by the examples below:
- echo "1.19.23" | grep -e "2." -e "latest" matches (1.19.23)
- echo "1.24.0" | grep -e "2." -e "latest" matches (1.24.0)
- echo "1.2.1" | grep -e "2." -e "latest" matches (1.2. 1)
- echo "1.16.213" | grep -e "2." -e "latest" matches (1.16.213)
Supplying the above version numbers would result in the Version 2 path to be assigned instead of the Version 1 path!
The correct expression is 'grep -e "^2\."' - this will ensure that only versions beginning with "2", followed by a '.', will match. I recommend updating the grep statement to reflect this, aligning it with the intended behavior.