Skip to content

Commit

Permalink
Fix changed_cr_files
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Nov 8, 2024
1 parent cb9047b commit 90a487f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/git/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ changed_cr_files=$(git diff --cached --name-only --diff-filter=ACM | grep '\.cr$

if [ -x bin/crystal ]; then
# use bin/crystal wrapper when available to run local compiler build
exec bin/crystal tool format --check "$changed_cr_files" >&2
# shellcheck disable=SC2086
exec bin/crystal tool format --check $changed_cr_files >&2
else
exec crystal tool format --check "$changed_cr_files" >&2
# shellcheck disable=SC2086
exec crystal tool format --check $changed_cr_files >&2
fi

0 comments on commit 90a487f

Please sign in to comment.