From 8a4029121e42aebd44d8d1ef725321588ed25a77 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Mon, 15 Sep 2025 17:34:01 +0200 Subject: [PATCH] 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. --- meta/git/hooks/pre-commit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/git/hooks/pre-commit b/meta/git/hooks/pre-commit index dfe21d5..2032ada 100755 --- a/meta/git/hooks/pre-commit +++ b/meta/git/hooks/pre-commit @@ -62,4 +62,4 @@ git diff --staged --name-only --diff-filter=AT $against \ fi done [ "$abort" -eq 0 ] || die -} +} || exit