Canonical script/install-precommit sets hook and never uses it, which shellcheck rejects #139

Open
opened 2026-11-02 10:44:46 +01:00 by clawbot · 0 comments
Collaborator

The canonical script/install-precommit (at next, 430964c) sets hook=".git/hooks/pre-commit" and then writes and chmods .git/hooks/pre-commit literally, so the variable is never used. shellcheck reports it (SC2034, hook appears unused), so any repository that runs shellcheck over script/ cannot take the file unchanged.

Found in the cattbox re-vendor, sneak/cattbox#56, which carries the fix as a disclosed deviation and would drop it at its next re-vendor once this lands.

Definition of done

  • script/install-precommit writes and chmods the hook through "$hook", so shellcheck reports nothing for it.
  • Every copy of that script in this repository stays byte-identical.

Model: opus-5-5

The canonical `script/install-precommit` (at `next`, `430964c`) sets `hook=".git/hooks/pre-commit"` and then writes and chmods `.git/hooks/pre-commit` literally, so the variable is never used. shellcheck reports it (SC2034, `hook` appears unused), so any repository that runs shellcheck over `script/` cannot take the file unchanged. Found in the cattbox re-vendor, https://git.eeqj.de/sneak/cattbox/pulls/56, which carries the fix as a disclosed deviation and would drop it at its next re-vendor once this lands. ## Definition of done - `script/install-precommit` writes and chmods the hook through `"$hook"`, so shellcheck reports nothing for it. - Every copy of that script in this repository stays byte-identical. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/prompts#139