Fix pre-commit hook compatibility

This commit is contained in:
h3p 2026-03-31 11:50:41 +02:00
parent 16d790021c
commit 255b669029
No known key found for this signature in database

View file

@ -8,7 +8,10 @@ if [[ "${NVE_SKIP_BUILD_NUMBER_BUMP:-0}" == "1" ]]; then
exit 0
fi
mapfile -t staged_files < <(git diff --cached --name-only --diff-filter=ACMR)
staged_files=()
while IFS= read -r path; do
staged_files+=("$path")
done < <(git diff --cached --name-only --diff-filter=ACMR)
if (( ${#staged_files[@]} == 0 )); then
exit 0
fi