From d1fa709cd4706ffc4d15bd0ba3e53998311d7b70 Mon Sep 17 00:00:00 2001 From: Tw93 Date: Sun, 12 Oct 2025 16:09:58 +0800 Subject: [PATCH] Fix shell formatter workflow for macOS (#23) --- .github/workflows/shell-format.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/shell-format.yml b/.github/workflows/shell-format.yml index 437281d..0a51c43 100644 --- a/.github/workflows/shell-format.yml +++ b/.github/workflows/shell-format.yml @@ -25,7 +25,10 @@ jobs: - name: Run shfmt in diff mode run: | set -euo pipefail - mapfile -d '' files < <(find . -type f \( -name '*.sh' -o -name 'mole' \) \ + files=() + while IFS= read -r -d '' file; do + files+=("$file") + done < <(find . -type f \( -name '*.sh' -o -name 'mole' \) \ ! -path './.git/*' ! -path './tests/tmp-*' -print0) if (( ${#files[@]} == 0 )); then echo "No shell files found; skipping shfmt" @@ -36,7 +39,10 @@ jobs: - name: Run shellcheck run: | set -euo pipefail - mapfile -d '' files < <(find . -type f \( -name '*.sh' -o -name 'mole' \) \ + files=() + while IFS= read -r -d '' file; do + files+=("$file") + done < <(find . -type f \( -name '*.sh' -o -name 'mole' \) \ ! -path './.git/*' ! -path './tests/tmp-*' -print0) if (( ${#files[@]} == 0 )); then echo "No shell files found; skipping shellcheck"