mirror of
https://github.com/Homebrew/brew.git
synced 2026-10-28 09:34:42 +08:00
- Keep Stop hook stdout valid JSON so Codex can parse it. - Move `./bin/brew lgtm` handling into a wrapper script.
14 lines
373 B
Bash
Executable File
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
|