On macOS /dev/tty always exists, so '[ -e /dev/tty ]' passed even in agent
harnesses/CI with no controlling terminal — the subsequent read then died
with ENXIO ('Device not configured') and blocked the commit instead of taking
the hook's own non-interactive branch. Probe with '( : < /dev/tty )' — the
exact operation that fails. Both prompt sites fixed; the deliberate asymmetry
preserved (debug keywords warn-and-proceed; secrets fail closed). Verified
both paths from a non-TTY context. Surfaced via the be a11y-gate commit
bypass logged in today's ledger.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Git Hooks
This directory contains global git hooks that can be used across all repositories.
Setup
- Configure git to use this directory for hooks:
git config --global core.hooksPath ~/dotfiles/git/hooks
- Make hooks executable:
chmod +x ~/dotfiles/git/hooks/*
Available Hooks
pre-commit: Run before each commitcommit-msg: Validate commit messagespre-push: Run before pushing
Per-Repository Hooks
To use repository-specific hooks instead of global ones:
git config --local core.hooksPath .git/hooks