1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 14:26:46 +00:00

Fix shell formatter workflow for macOS (#23)

This commit is contained in:
Tw93
2025-10-12 16:09:58 +08:00
committed by GitHub
parent 3c56fe0633
commit d1fa709cd4

View File

@@ -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"