Don't use mapfile to be compatible with Bash 3 on MacOS

This does assume that the path `target/*/build/bandwhich-*/stderr` contains no
spaces, but it should be fine.
This commit is contained in:
cyqsimon
2023-08-27 00:26:57 +08:00
parent 9c11b59c55
commit f37f70b074

View File

@@ -37,8 +37,9 @@ jobs:
- name: Show build.rs stderr
shell: bash
run: |
mapfile -d '' -t STDERR_FILES < <(find "./target/debug" -name stderr -print0 | grep -z bandwhich)
for FILE in "${STDERR_FILES[@]}"; do
# it's probably okay to assume no spaces?
STDERR_FILES=$(find "./target/debug" -name stderr | grep bandwhich)
for FILE in $STDERR_FILES; do
echo "::group::$FILE"
cat "$FILE"
echo "::endgroup::"