Files
brew/.codex/hooks/brew-lgtm-stop.sh
T
Mike McQuaid 694e77e1c0 Wrap stop hook lgtm output
- Keep Stop hook stdout valid JSON so Codex can parse it.
- Move `./bin/brew lgtm` handling into a wrapper script.
2026-06-13 08:17:31 +01:00

14 lines
373 B
Bash
Executable File

#!/bin/bash
cd "$(dirname "$0")/../.." || {
printf '%s\n' '{"decision":"block","reason":"Failed to cd to the repository root before running ./bin/brew lgtm."}'
exit 0
}
if ./bin/brew lgtm >&2
then
printf '%s\n' '{"continue":true}'
else
printf '%s\n' '{"decision":"block","reason":"./bin/brew lgtm failed; review the output above and fix it before stopping."}'
fi