hooks.pre-bash¶
Refuse the Bash commands that succeed while silently breaking state.
The two: a footman gate piped into tail/head, and a git push of a branch that conflicts with origin/main. Ported from footman's own loop.
The pipe guard. A gate's exit code is its verdict, and a pipe
replaces it with the filter's, so fm check | tail -4 reports 0
whatever happened and prints the step summary while the failing step
scrolls past above. A red gate has been reported green here exactly
that way.
The push guard. Agent sessions share this repository, so main moves while a branch is being built, and a branch pushed from a stale base opens a conflicting pull request for which GitHub cannot build its test-merge and therefore spawns no CI at all: no red X, no checks, just an absence nothing points at. The guard runs the same test-merge locally (git merge-tree --write-tree) before letting the push through. Tag pushes, deletions, and pushes of main itself pass untouched.
Both are deliberately narrow. Command separators split first, so
fm check && echo done | tail stays legal; quoted spans are data, so
rg "fm check" | head passes. Nudges, not a sandbox.
Hidden: this task is not listed by fm --list, --tree or completion — it runs like any other when named.
| Parameter | Type | Default | Description |
|---|---|---|---|
<event> |