Skip to content

Commit f810390

Browse files
authored
Merge pull request #519 from netwrix/dev
detect Vale warnings by checking output instead of exit code
2 parents 93a704f + 1a5d4ae commit f810390

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

.husky/pre-push

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ echo "$CHANGED_MD_FILES" > "$TMPFILE"
6464

6565
while IFS= read -r FILE; do
6666
if [ -f "$FILE" ]; then
67-
OUTPUT=$(vale --minAlertLevel=warning "$FILE" 2>&1)
68-
EXIT_CODE=$?
69-
if [ $EXIT_CODE -ne 0 ]; then
67+
OUTPUT=$(vale "$FILE" 2>&1)
68+
if echo "$OUTPUT" | grep -q "warning\|error"; then
7069
echo "$OUTPUT"
7170
echo ""
7271
VALE_FAILED=1

0 commit comments

Comments
 (0)