Files
codebase-memory-mcp/scripts
Andrew Hundt fecde17874 fix(build): preserve leak command status under /bin/sh
Replace Makefile.cbm's four Bash-only PIPESTATUS recipes with one run_logged_command macro. The command side records its exit code in a per-process sidecar while tee streams the report; the recipe returns the command failure first, otherwise tee's failure, and removes the sidecar through a POSIX trap.

Add tests/test_makefile_logged_command.sh to scripts/test.sh's fast contracts. It proves success logging, exit-7 propagation, report-write failure, and cleanup under /bin/sh and /bin/dash. A focused macOS test-leak TEST_LEAK_SUITES=arena run passed 31 tests and reported 0 leaks.

Signed-off-by: Andrew Hundt <ATHundt@gmail.com>
2026-07-25 18:46:11 -04:00
..