hooks:pre-commit: Explicitly propagate pipe error

The `die` in the pipe does not exit the whole script but only the pipe.
This currently works because the pipe is the last thing being executed.
If something would come after the pipe, the hook would happily continue
executing. Properly propagate the exit to prevent this in the future.
This commit is contained in:
2025-09-15 17:34:01 +02:00
parent 7c184ed11e
commit 8a4029121e

View File

@@ -62,4 +62,4 @@ git diff --staged --name-only --diff-filter=AT $against \
fi
done
[ "$abort" -eq 0 ] || die
}
} || exit