wForget commented on code in PR #5308:
URL: https://github.com/apache/kyuubi/pull/5308#discussion_r1329550417


##########
build/release/release.sh:
##########
@@ -52,6 +52,20 @@ if [[ ${RELEASE_VERSION} =~ .*-SNAPSHOT ]]; then
   exit 1
 fi
 
+if [[ -z ${JAVA_HOME} ]]; then
+  if [[ $(command -v java) ]]; then
+    # shellcheck disable=SC2046
+    export JAVA_HOME="$(dirname $(dirname $(which java)))"

Review Comment:
   How about just getting javacmd?
   ```
   if [ -z "$JAVA_HOME" ] ; then
     JAVA_CMD="`\\unset -f command; \\command -v java`"
   else
     JAVA_CMD="$JAVA_HOME/bin/java"
   fi
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to