pan3793 commented on code in PR #5308:
URL: https://github.com/apache/kyuubi/pull/5308#discussion_r1329552235
##########
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:
```
# Find the java binary
if [ -n "${JAVA_HOME}" ]; then
JAVA="${JAVA_HOME}/bin/java"
else if [ "$(command -v java)" ]; then
JAVA="java"
else
echo "JAVA_HOME is not set" >&2
exit 1
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]