You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by al...@apache.org on 2020/05/03 14:25:27 UTC
[zeppelin] branch master updated: [ZEPPELIN-4791] Fix Java version
check on MacOS
This is an automated email from the ASF dual-hosted git repository.
alexott pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push:
new 9a578a3 [ZEPPELIN-4791] Fix Java version check on MacOS
9a578a3 is described below
commit 9a578a3c33be285247161463ff749a96f56bbf9a
Author: Alex Ott <al...@apache.org>
AuthorDate: Sat May 2 18:28:00 2020 +0200
[ZEPPELIN-4791] Fix Java version check on MacOS
### What is this PR for?
on MacOS, `[0-9]\+` doesn't work, so it was replaced with `[0-9][0-9]*`
### What type of PR is it?
Bug Fix
### What is the Jira issue?
* ZEPPELIN-4791
### How should this be tested?
* Tested manually on Mac & Linux
* https://travis-ci.org/github/alexott/zeppelin/builds/682342684
Author: Alex Ott <al...@apache.org>
Closes #3758 from alexott/fix-java-version-check-on-mac and squashes the following commits:
9a77874b8 [Alex Ott] [HotFix] Fix Java version check on MacOS
---
bin/common.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/common.sh b/bin/common.sh
index eb959e1..d9cb812 100644
--- a/bin/common.sh
+++ b/bin/common.sh
@@ -65,9 +65,9 @@ ZEPPELIN_CLASSPATH+=":${ZEPPELIN_CONF_DIR}"
function check_java_version() {
java_ver_output=$("${JAVA:-java}" -version 2>&1)
jvmver=$(echo "$java_ver_output" | grep '[openjdk|java] version' | awk -F'"' 'NR==1 {print $2}' | cut -d\- -f1)
- JVM_VERSION=$(echo "$jvmver"|sed -e 's|^\([0-9]\+\)\..*$|\1|')
+ JVM_VERSION=$(echo "$jvmver"|sed -e 's|^\([0-9][0-9]*\)\..*$|\1|')
if [ "$JVM_VERSION" = "1" ]; then
- JVM_VERSION=$(echo "$jvmver"|sed -e 's|^1\.\([0-9]\+\)\..*$|\1|')
+ JVM_VERSION=$(echo "$jvmver"|sed -e 's|^1\.\([0-9][0-9]*\)\..*$|\1|')
fi
if [ "$JVM_VERSION" -lt 8 ] || ([ "$JVM_VERSION" -eq 8 ] && [ "${jvmver#*_}" -lt 151 ]) ; then