mirror of
https://github.com/tw93/Mole.git
synced 2026-02-12 22:10:14 +00:00
Fix shell formatter workflow for macOS (#23)
This commit is contained in:
10
.github/workflows/shell-format.yml
vendored
10
.github/workflows/shell-format.yml
vendored
@@ -25,7 +25,10 @@ jobs:
|
|||||||
- name: Run shfmt in diff mode
|
- name: Run shfmt in diff mode
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
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)
|
! -path './.git/*' ! -path './tests/tmp-*' -print0)
|
||||||
if (( ${#files[@]} == 0 )); then
|
if (( ${#files[@]} == 0 )); then
|
||||||
echo "No shell files found; skipping shfmt"
|
echo "No shell files found; skipping shfmt"
|
||||||
@@ -36,7 +39,10 @@ jobs:
|
|||||||
- name: Run shellcheck
|
- name: Run shellcheck
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
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)
|
! -path './.git/*' ! -path './tests/tmp-*' -print0)
|
||||||
if (( ${#files[@]} == 0 )); then
|
if (( ${#files[@]} == 0 )); then
|
||||||
echo "No shell files found; skipping shellcheck"
|
echo "No shell files found; skipping shellcheck"
|
||||||
|
|||||||
Reference in New Issue
Block a user