diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40368503d13..1900561441c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -359,7 +359,7 @@ jobs: - name: gix-pack with all features (including wasm) run: cd gix-pack && cargo build --all-features --target "$TARGET" - check-modes: + check-mode: # FIXME: Only run this on ubuntu-latest (don't use a matrix). strategy: fail-fast: false diff --git a/etc/check-mode.sh b/etc/check-mode.sh index 7e4bc4c56a8..4bc15b79ba5 100755 --- a/etc/check-mode.sh +++ b/etc/check-mode.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash set -eu -o pipefail -shopt -s lastpipe # Go to the worktree's root. (Even if the dir name ends in a newline.) root_padded="$(git rev-parse --show-toplevel && echo -n .)" @@ -29,13 +28,13 @@ function check () { status=1 } -# For now, check just regular files named with a `.sh` suffix. -git ls-files -sz -- '*.sh' | while read -rd '' mode oid _stage_number path; do +# Check regular files named with a `.sh` suffix. +while read -rd '' mode oid _stage_number path; do case "$mode" in 100644 | 100755) check "$mode" "$oid" "$path" ;; esac -done +done < <(git ls-files -sz -- '*.sh') exit "$status"