Bug
post-test-runner.sh errors on macOS due to two GNU-isms:
date +%s%3N — %3N (millisecond suffix) is not supported by BSD date on macOS. It outputs a literal N in the timestamp, causing the arithmetic on line 44 to fail with value too great for base.
timeout — ships as gtimeout on macOS (via GNU coreutils); the bare timeout command does not exist, so line 41 fails with timeout: command not found.
Fix
- Replace
date +%s%3N with python3 -c 'import time; print(int(time.time() * 1000))'
- Replace
timeout 60 with $(command -v gtimeout || command -v timeout || echo bash) 60 (or guard with command -v)
Impact
The hook fires on every Write/Edit tool call and exits with an error, even when the underlying file write succeeded. Noisy but not blocking.
Bug
post-test-runner.sherrors on macOS due to two GNU-isms:date +%s%3N—%3N(millisecond suffix) is not supported by BSDdateon macOS. It outputs a literalNin the timestamp, causing the arithmetic on line 44 to fail withvalue too great for base.timeout— ships asgtimeouton macOS (via GNU coreutils); the baretimeoutcommand does not exist, so line 41 fails withtimeout: command not found.Fix
date +%s%3Nwithpython3 -c 'import time; print(int(time.time() * 1000))'timeout 60with$(command -v gtimeout || command -v timeout || echo bash) 60(or guard withcommand -v)Impact
The hook fires on every Write/Edit tool call and exits with an error, even when the underlying file write succeeded. Noisy but not blocking.