fix(01-02): resolve claude and env paths through symlinks
readlink -f ensures CLAUDE_BIN and env point to real nix store paths accessible inside the bwrap sandbox. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
14642eb32e
commit
9296453be3
1 changed files with 2 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
# Resolve claude binary from host PATH (before clearenv strips it)
|
||||
CLAUDE_BIN=$(command -v claude) || {
|
||||
CLAUDE_BIN=$(readlink -f "$(command -v claude)") || {
|
||||
echo "error: claude not found in PATH" >&2
|
||||
echo "Install Claude Code first: https://docs.anthropic.com/en/docs/claude-code" >&2
|
||||
exit 1
|
||||
|
|
@ -79,7 +79,7 @@ exec bwrap \
|
|||
--ro-bind /etc/hosts /etc/hosts \
|
||||
--ro-bind /etc/nsswitch.conf /etc/nsswitch.conf \
|
||||
--ro-bind /etc/nix /etc/nix \
|
||||
--symlink "$(command -v env)" /usr/bin/env \
|
||||
--symlink "$(readlink -f "$(command -v env)")" /usr/bin/env \
|
||||
--tmpfs "$HOME" \
|
||||
--bind "$HOME/.claudebox" "$HOME/.claude" \
|
||||
--ro-bind "$GITCONFIG_TMP" "$HOME/.gitconfig" \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue