diff options
| author | Henry J. Webster <hwebs@hwebs.info> | 2026-10-31 13:35:31 -0500 |
|---|---|---|
| committer | Henry J. Webster <hwebs@hwebs.info> | 2026-10-31 13:35:31 -0500 |
| commit | 0f200b416bfd5b0925c06527b3f8bdf5040caf6e (patch) | |
| tree | 35240646d96c3cec7eec90cbd94e1ebd5c59fb2c /.githooks | |
| parent | fc667669efbffdaa93e10a4ccef9142f1aff96ab (diff) | |
fix pre-commit
Diffstat (limited to '.githooks')
| -rwxr-xr-x | .githooks/pre-commit | 10 |
1 files changed, 8 insertions, 2 deletions
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 |
