bitflicker64 commented on code in PR #778:
URL: 
https://github.com/apache/hugegraph-toolchain/pull/778#discussion_r4181353795


##########
hugegraph-loader/assembly/static/bin/hugegraph-loader.sh:
##########
@@ -73,12 +73,20 @@ CP="$CP":$(find -L ${LIB} -name '*.jar' \
 
 export LOADER_CLASSPATH="${CLASSPATH:-}:$CP"
 
+# Hive ORC interns URI fields reflectively; Java 17 requires this opening.
+# Keep the existing Java baseline usable while preparing for the upgrade.
+JAVA_VERSION=$("$JAVA" -version 2>&1 | awk -F '"' '/version/ {print $2; exit}')

Review Comment:
   Minor: This probe runs under `set -eo pipefail` with `2>&1` piped into awk. 
When `JAVA_HOME` is unset and `java` is not on PATH, `"$JAVA" -version` exits 
127, the shell's "command not found" text is swallowed by awk, and `set -e` 
ends the launcher with exit 127 and no message. Before this change the script 
reached `exec java ...`, which at least printed a "not found" error. Reproduced 
with `bash -c 'set -eo pipefail; JAVA=nonexistent-java-xyz; V=$("$JAVA" 
-version 2>&1 | awk -F \" "/version/ {print \$2; exit}"); echo reached'`, which 
prints nothing and exits 127. Please verify the executable first, for example 
`command -v "$JAVA" >/dev/null 2>&1 || { echo "Unable to find java executable. 
Check JAVA_HOME and PATH environment variables." >&2; exit 1; }`, or make the 
probe non-fatal with `|| true`.



-- 
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