From e12088e8889ec7517d0c63ccab8de9d58d6d8aa1 Mon Sep 17 00:00:00 2001 From: hamlin Date: Wed, 18 Oct 2023 08:11:18 +0000 Subject: [PATCH 1/2] Enable support for internal jdk --- sbt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbt b/sbt index 5c0c3bd..6685232 100755 --- a/sbt +++ b/sbt @@ -217,7 +217,8 @@ getJavaVersion() { if [[ "$str" =~ ^1\.([0-9]+)(\..*)?$ ]]; then echo "${BASH_REMATCH[1]}" # Fixes https://github.com/dwijnand/sbt-extras/issues/326 - elif [[ "$str" =~ ^([0-9]+)(\..*)?(-ea)?$ ]]; then + # Fixes https://github.com/dwijnand/sbt-extras/issues/378 + elif [[ "$str" =~ ^([0-9]+)(\..*)?-(ea|internal)?$ ]]; then echo "${BASH_REMATCH[1]}" elif [[ -n "$str" ]]; then echoerr "Can't parse java version from: $str" From 664deda49624d56c60de8e614e5a4cf0a6ddbed8 Mon Sep 17 00:00:00 2001 From: hamlin Date: Mon, 23 Oct 2023 07:52:07 +0000 Subject: [PATCH 2/2] Fix regex matching -ea|-internal --- sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbt b/sbt index 6685232..a1446a2 100755 --- a/sbt +++ b/sbt @@ -218,7 +218,7 @@ getJavaVersion() { echo "${BASH_REMATCH[1]}" # Fixes https://github.com/dwijnand/sbt-extras/issues/326 # Fixes https://github.com/dwijnand/sbt-extras/issues/378 - elif [[ "$str" =~ ^([0-9]+)(\..*)?-(ea|internal)?$ ]]; then + elif [[ "$str" =~ ^([0-9]+)(\..*)?(-ea|-internal)?$ ]]; then echo "${BASH_REMATCH[1]}" elif [[ -n "$str" ]]; then echoerr "Can't parse java version from: $str"