This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push: new ac13b23177 [improve](script) echo infos if java cmd is not valid when starting be (#24714) ac13b23177 is described below commit ac13b23177a4175f6b16fc9e77f3e49dab8435f6 Author: Dongyang Li <hello_step...@qq.com> AuthorDate: Thu Sep 21 12:43:24 2023 +0800 [improve](script) echo infos if java cmd is not valid when starting be (#24714) Co-authored-by: stephen <hello-step...@qq.com> --- bin/start_be.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/start_be.sh b/bin/start_be.sh index a2f5f399dc..b527ca0069 100755 --- a/bin/start_be.sh +++ b/bin/start_be.sh @@ -142,10 +142,12 @@ jdk_version() { local result local IFS=$'\n' - if [[ -z "${java_cmd}" ]]; then + if ! command -v "${java_cmd}"; then + echo "ERROR: invalid java_cmd ${java_cmd}" >>"${LOG_DIR}/be.out" result=no_java return 1 else + echo "INFO: java_cmd ${java_cmd}" >>"${LOG_DIR}/be.out" local version # remove \r for Cygwin version="$("${java_cmd}" -Xms32M -Xmx32M -version 2>&1 | tr '\r' '\n' | grep version | awk '{print $3}')" @@ -155,6 +157,7 @@ jdk_version() { else result="$(echo "${version}" | awk -F '.' '{print $1}')" fi + echo "INFO: jdk_version ${result}" >>"${LOG_DIR}/be.out" fi echo "${result}" return 0 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org