From b806afcc4642636bee0adfe659e3e0bccd910dd0 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Mon, 5 May 2025 10:28:54 +0300 Subject: [PATCH] githooks: run all checks in pre-commit hook Previous usage of exec caused only the first script to be run. --- .githooks/pre-commit | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 9381419d51b..510221f48a5 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -20,6 +20,13 @@ set -o pipefail REPO_ROOT="$(git rev-parse --show-toplevel)" -exec "${REPO_ROOT}/hack/verify-kep-metadata.sh" -exec "${REPO_ROOT}/hack/verify-toc.sh" -exec "${REPO_ROOT}/hack/verify-spelling.sh" +scripts=( + "hack/verify-kep-metadata.sh" + "hack/verify-toc.sh" + "hack/verify-spelling.sh" +) + +for s in "${scripts[@]}"; do + echo "Running $s..." + "${REPO_ROOT}/$s" || exit 1 +done