From 508318ff32f8109b4ed9dd2da9ae8a35c88c68ba Mon Sep 17 00:00:00 2001 From: Philip Nunoo Date: Mon, 30 Sep 2024 12:02:14 +0200 Subject: [PATCH] Ensure Java 17 or higher is the active version in dev-setup/setup_macos.sh --- dev-setup/setup_macos.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dev-setup/setup_macos.sh b/dev-setup/setup_macos.sh index 6612197d..31690a2d 100755 --- a/dev-setup/setup_macos.sh +++ b/dev-setup/setup_macos.sh @@ -116,12 +116,12 @@ else exit 1 fi -# ensure Java 17 is the active version +# ensure Java 17 or higher is the active version JAVA_VERSION=$(java -version 2>&1 | head -n 1 | cut -d\" -f2) -if [ ! -z $(echo $JAVA_VERSION | egrep "^17") ]; then - echo '[X] Java 17 is available in the path' +if [[ ! -z $(echo $JAVA_VERSION | egrep "^1[7-9]|^[2-9][0-9]") ]]; then + echo '[X] Java 17 or higher is available in the path' else - echo 'Java 17 is not available in the path' + echo 'Java 17 or higher is not available in the path' exit 1 fi