diff options
| author | Preston Pan <ret2pop@nullring.xyz> | 2026-03-04 19:10:22 -0800 |
|---|---|---|
| committer | Preston Pan <ret2pop@nullring.xyz> | 2026-03-04 19:10:22 -0800 |
| commit | d0277a71ad64e41d5f9e184bbd23bfded267b879 (patch) | |
| tree | ff6cd8623867f140fb9ad2506540493602a42c2a | |
| parent | 9d2b6383f60867b2e47e212fa66ed33fcbf43a18 (diff) | |
make git hook better
| -rw-r--r-- | flake.nix | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -30,7 +30,10 @@ description = "Ensure website can build, and tests links"; stages = [ "post-merge" ]; entry = "${pkgs.writeShellScript "website-check" '' -trap 'echo "Interrupted!"; exit 1' INT +set -e +set -o pipefail +trap "echo -e '\nHook interrupted by user. Aborting merge!'; exit 1" INT TERM + BRANCH=$(git branch --show-current) if [ "$BRANCH" != "main" ]; then exit 0 |
