From 44d1430e3465c99b9ed4f595948c9c8b1e485950 Mon Sep 17 00:00:00 2001 From: jth-nw Date: Fri, 13 Mar 2026 14:54:26 -0500 Subject: [PATCH] fix: use POSIX-compatible file redirection in pre-push hook The <<< here-string syntax is bash-only. Replace with a temp file redirect that works under sh. Co-Authored-By: Claude Opus 4.6 --- .husky/pre-push | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.husky/pre-push b/.husky/pre-push index c48c86560d..2332ad3d56 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -58,6 +58,10 @@ echo "" VALE_FAILED=0 +# Write file list to a temp file so we can iterate without a subshell +TMPFILE=$(mktemp) +echo "$CHANGED_MD_FILES" > "$TMPFILE" + while IFS= read -r FILE; do if [ -f "$FILE" ]; then OUTPUT=$(vale "$FILE" 2>&1) @@ -68,7 +72,9 @@ while IFS= read -r FILE; do VALE_FAILED=1 fi fi -done <<< "$CHANGED_MD_FILES" +done < "$TMPFILE" + +rm -f "$TMPFILE" if [ "$VALE_FAILED" -eq 1 ]; then echo "Vale found errors in the files above."