Commit 62ca403
committed
fix(setup): route gen:skill-docs through bun_cmd; drop tail -3 pipe that masks bun failures
Two surgical fixes called out by @jbetala7 on garrytan#1883, carved out as the
focused fast-merge PR they asked for.
1. link_codex_skill_dirs, link_factory_skill_dirs, and
link_opencode_skill_dirs called literal `bun run gen:skill-docs ...`
instead of routing through `bun_cmd`, the wrapper installed by
prepare_bun_for_windows_compile. On a non-ASCII Windows username the
literal call would exit non-zero; the next line checks if the output
directory exists and prints a soft warning, masking the failure.
2. The gbrain-detected SKILL.md regen ran
`bun_cmd run gen:skill-docs:user --host claude 2>&1 | tail -3`. The
pipe makes the subshell's exit status `tail`'s (always 0), swallowing
bun's failure so the `|| log "warning..."` clause right after never
fires regardless of whether bun succeeded.
Tests exercise the exit-code path, not source-grep: stub bun_cmd to fail,
run the actual shell pattern, assert the `|| log` clause fires only on
the fixed shape and does NOT fire on the buggy shape with the pipe.1 parent 9cc41b7 commit 62ca403
5 files changed
Lines changed: 252 additions & 160 deletions
0 commit comments