Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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."
Expand Down
Loading