Dev setup for macOS: Java version check now looks for any version beginning with "17", whereas before, the version had to specifically be "17", so 17.x point releases were not being properly detected

This commit is contained in:
k8wu 2024-05-21 19:08:56 -04:00
parent 2bfb6c635c
commit 5a4a06d14e

View File

@ -126,7 +126,7 @@ fi
# ensure Java 17 is the active version # ensure Java 17 is the active version
JAVA_VERSION=$(java -version 2>&1 | head -n 1 | cut -d\" -f2) JAVA_VERSION=$(java -version 2>&1 | head -n 1 | cut -d\" -f2)
if [ "$JAVA_VERSION" == "17" ]; then if [ ! -z $(echo $JAVA_VERSION | egrep "^17") ]; then
echo '[X] Java 17 is available in the path' echo '[X] Java 17 is available in the path'
else else
echo 'Java 17 is not available in the path' echo 'Java 17 is not available in the path'