This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch karaf-4.2.x
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/karaf-4.2.x by this push:
     new efd9ae0c12 KARAF-7746: Improve checkJVM function in bin/inc
efd9ae0c12 is described below

commit efd9ae0c12d4d2de097eee3bde2b955ec9f0590b
Author: JB Onofré <j...@nanthrax.net>
AuthorDate: Mon Sep 4 16:53:53 2023 +0200

    KARAF-7746: Improve checkJVM function in bin/inc
    
    (cherry picked from commit d3b20d77679061ecd51da5b2270f40f0d1aad840)
---
 assemblies/features/base/src/main/filtered-resources/resources/bin/inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/assemblies/features/base/src/main/filtered-resources/resources/bin/inc 
b/assemblies/features/base/src/main/filtered-resources/resources/bin/inc
index 2fc743dabf..eb73fc7cc2 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/inc
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/inc
@@ -241,7 +241,7 @@ checkJvmVersion() {
         fi
     fi
 
-    VERSION=`"${JAVA}" -version 2>&1 | ${AWK} -F '"' '/version/ {print $2}' | 
sed -e 's/_.*//g; s/^1\.//g; s/\..*//g; s/-.*//g;'`
+    VERSION=`"${JAVA}" -version 2>&1 | ${AWK} -F '"' '/version/ {print $2}' | 
sed -e 's/_.*//g; s/^1\.//g; s/\..*//g; s/-.*//g;s/-.*//g; s/^[A-Za-z].*//'`
 
     # java must be at least version 8
     if [ "${VERSION}" -lt "8" ]; then

Reply via email to