From badac32cd3ba7fd2c355de545e266bee1a37f683 Mon Sep 17 00:00:00 2001 From: sneak Date: Sun, 15 Nov 2026 12:59:05 +0000 Subject: [PATCH] script/install-precommit: write the hook through $hook (closes #139) The script set hook and then repeated the path literally, so shellcheck reported the variable as unused (SC2034). Model: opus-5-5 --- script/install-precommit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/install-precommit b/script/install-precommit index bef6406..723bae1 100755 --- a/script/install-precommit +++ b/script/install-precommit @@ -8,8 +8,8 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd -P)" main() { cd "$ROOT" hook=".git/hooks/pre-commit" - printf '#!/bin/sh\nset -e\nscript/precommit\n' > .git/hooks/pre-commit - chmod +x .git/hooks/pre-commit + printf '#!/bin/sh\nset -e\nscript/precommit\n' > "$hook" + chmod +x "$hook" echo "pre-commit hook installed: runs script/precommit" }