This is an automated email from the ASF dual-hosted git repository. jinrongtong pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push: new 178421386f [ISSUE #7786] Optimize the execution logic of tool.sh in the JRE environment 178421386f is described below commit 178421386f728f0320bad550e965b74a0b088d40 Author: Poirot Hercule <yeziqi...@163.com> AuthorDate: Mon Jan 29 09:40:19 2024 +0800 [ISSUE #7786] Optimize the execution logic of tool.sh in the JRE environment --- distribution/bin/tools.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/distribution/bin/tools.sh b/distribution/bin/tools.sh index d772465a3d..9b1e1d804d 100644 --- a/distribution/bin/tools.sh +++ b/distribution/bin/tools.sh @@ -26,12 +26,12 @@ error_exit () find_java_home() { + if [ -n "$JAVA_HOME" ]; then + JAVA_HOME=$JAVA_HOME + return + fi case "`uname`" in Darwin) - if [ -n "$JAVA_HOME" ]; then - JAVA_HOME=$JAVA_HOME - return - fi JAVA_HOME=$(/usr/libexec/java_home) ;; *)