This is an automated email from the ASF dual-hosted git repository. jiafengzheng pushed a commit to branch env_fix in repository https://gitbox.apache.org/repos/asf/doris.git
commit 4d2bd29dc5218955f8a6737be0f3dd1f791da14c Author: jiafeng.zhang <zhang...@gmail.com> AuthorDate: Wed Aug 30 13:03:53 2023 +0800 [fix](build)fix env.sh --- env.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/env.sh b/env.sh index a7fe915316..9fdebccaba 100755 --- a/env.sh +++ b/env.sh @@ -146,7 +146,15 @@ elif [[ "${DORIS_TOOLCHAIN}" == "clang" ]]; then fi covs=() - while IFS='' read -r line; do covs+=("${line}"); done < <(find "${DORIS_CLANG_HOME}" -name "llvm-cov*") + tmp_file=$(mktemp) + find "${DORIS_CLANG_HOME}" -name "llvm-cov*" > "$tmp_file" + + # Read lines from the temporary file and populate the array + while IFS= read -r line; do + covs+=("$line") + done < "$tmp_file" + + if [[ ${#covs[@]} -ge 1 ]]; then LLVM_COV="${covs[0]}" else @@ -155,7 +163,10 @@ elif [[ "${DORIS_TOOLCHAIN}" == "clang" ]]; then export LLVM_COV profdatas=() - while IFS='' read -r line; do profdatas+=("${line}"); done < <(find "${DORIS_CLANG_HOME}" -name "llvm-profdata*") + + find "${DORIS_CLANG_HOME}" -name "llvm-profdata*" | while IFS= read -r line; do + profdatas+=("$line") + done if [[ ${#profdatas[@]} -ge 1 ]]; then LLVM_PROFDATA="${profdatas[0]}" else --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org