From 740a50bfa57e2f7d5d348d033329ed49a8cddd59 Mon Sep 17 00:00:00 2001 From: Emilio Date: Tue, 6 Aug 2024 16:28:22 -0400 Subject: [PATCH] GEOMESA-3382 CLI - fix classpath lookup in Bash 4.3 and earlier (#3147) --- geomesa-tools/conf-filtered/geomesa-env.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/geomesa-tools/conf-filtered/geomesa-env.sh b/geomesa-tools/conf-filtered/geomesa-env.sh index d1d14f9813bd..7a2d3d83bfeb 100644 --- a/geomesa-tools/conf-filtered/geomesa-env.sh +++ b/geomesa-tools/conf-filtered/geomesa-env.sh @@ -175,7 +175,10 @@ function find_jars() { find_args=("-maxdepth" "1" "${find_args[@]}") fi # read results of find into jars array - mapfile -d '' jars < <(find "-L" "$home" "${find_args[@]}") + # don't use mapfile to support bash < 4.4 (RHEL 7) + while IFS= read -r -d $'\0'; do + jars+=("$REPLY") + done < <(find "-L" "$home" "${find_args[@]}") if [[ -d "${home}/native" ]]; then # TODO this doesn't export back to the parent shell... fix it if [[ -z "${JAVA_LIBRARY_PATH}" ]]; then