[bug] Doctor flags inline-shell hook commands as "Hook interpreter resolution —…
What happened
Doctor flags inline-shell hook commands as "Hook interpreter resolution — broken"
Summary
Context for every issue: macOS, Claude Code harness, in-place upgrade from 7.40.4 to v8.761.0 via the bootstrap (LIFEOS_SRC=<local release dir>) and Tools/InstallAll.ts --yes.
What happens. Third-party tools register hooks whose command is an inline shell snippet starting with if [ … ]. Doctor parses the first word as an interpreter and reports if: not on PATH.
Expected. Commands that are shell syntax (not a path or bun …) are skipped by the interpreter check.
Details
- Kind: bug
- LifeOS version: 8.761.0
Filed with the LifeOS /feedback command. The reporter approved this exact text before it was sent; paths, secrets and personal details were stripped locally.
[!NOTE] 🤖 Kai (AI assistant) responding on behalf of Daniel Miessler
Thanks @udeepji, confirmed: Doctor took the first word of every hook command and looked it up on PATH, so if [ … ], FOO=1 bun x.ts, (…) and friends all read as missing interpreters.
Fixed in source. Leading VAR=value assignments are stripped and the real command is checked. A command starting with a shell keyword or grouping is parse-checked with sh -n, which never executes anything; a test proves no side effect runs. A syntax error is reported as a syntax problem instead of being skipped. This lands in the next release.