From 0f200b416bfd5b0925c06527b3f8bdf5040caf6e Mon Sep 17 00:00:00 2001 From: "Henry J. Webster" Date: Sat, 31 Oct 2026 13:35:31 -0500 Subject: fix pre-commit --- .githooks/pre-commit | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to '.githooks') diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 5ba733d..0af6083 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -1,5 +1,11 @@ #!/bin/sh set -eu -git ls-files -z --cached -- '*.caddy' 'Caddyfile' '*/Caddyfile' | - xargs -0 -r caddy fmt --overwrite \ No newline at end of file +for file in Caddyfile site/cgit/Caddyfile; do + caddy fmt --overwrite "$file" +done + +if ! git diff --quiet -- Caddyfile site/cgit/Caddyfile; then + echo "Caddyfiles were formatted. Review and stage the changes." + exit 1 +fi \ No newline at end of file -- cgit v1.3