fix(bootstrap): jail npm PATH via /etc/profile.d, drop #120 .profile hack #121
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/jail-npm-path-profiled"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Root-causes and fixes the recurring FreeBSD "pi/bw not found in jail" bug (band-aided by #120).
How it crept in: the npm-global-on-PATH fix is canonical in the clawdie-iso image (
/etc/profile.d/clawdie.sh, all shells), but the agent jail is a separate environment that never reused it — a fresh Bastille jail doesn't inherit the image's profile.d, and the bootstrap set no PATH. #120 patched it with a hardcoded append to one user's~/.profile(sh-only, drifts fromNPM_PREFIX).Fix: use the image's mechanism, scoped to the jail —
/etc/profile.d/clawdie-npm.shderived fromNPM_PREFIX/etc/profile(all sh/bash login shells, system-wide), idempotently~/.profileappendPATH content now lives in a single file tied to
NPM_PREFIX, so it can't miss shells or drift. Follow-up (not here): hoist the snippet into one shared file installed by both clawdie-iso and the jail bootstrap, so a new environment can't re-grow this.Verified:
sh -nclean; smoke test (NPM_PREFIX expands /$PATHliteral //etc/profilesources it / idempotent / sourced shell resolves the bin onto PATH).🤖 Generated with Claude Code