fix: symlink ~/.claude to ~/.claudebox instead of renaming mount
Both paths now resolve inside the sandbox, so hook paths and settings referencing ~/.claude work without fixups. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d4cfa7a537
commit
e43d33602d
1 changed files with 6 additions and 3 deletions
|
|
@ -109,7 +109,8 @@ cat > "$HOME/.claudebox/SANDBOX.md" << 'SANDBOXEOF'
|
|||
|
||||
You are running inside a bubblewrap (bwrap) sandbox managed by claudebox.
|
||||
Your filesystem is isolated -- only the current working directory and
|
||||
essential system paths are mounted.
|
||||
essential system paths are mounted. Both ~/.claude and ~/.claudebox
|
||||
point to the same directory inside the sandbox.
|
||||
|
||||
## Installing Tools
|
||||
|
||||
|
|
@ -313,7 +314,8 @@ if [[ "$DRY_RUN" == true ]]; then
|
|||
echo " --ro-bind /etc/nix /etc/nix \\"
|
||||
printf ' --symlink %q /usr/bin/env \\\n' "$(readlink -f "$(command -v env)")"
|
||||
echo " --tmpfs $HOME \\"
|
||||
echo " --bind $HOME/.claudebox $HOME/.claude \\"
|
||||
echo " --bind $HOME/.claudebox $HOME/.claudebox \\"
|
||||
echo " --symlink $HOME/.claudebox $HOME/.claude \\"
|
||||
printf ' --ro-bind %q %s/.gitconfig \\\n' "$GITCONFIG_TMP" "$HOME"
|
||||
echo " --bind $CWD $CWD \\"
|
||||
echo " --chdir $CWD \\"
|
||||
|
|
@ -342,7 +344,8 @@ exec bwrap \
|
|||
--ro-bind /etc/nix /etc/nix \
|
||||
--symlink "$(readlink -f "$(command -v env)")" /usr/bin/env \
|
||||
--tmpfs "$HOME" \
|
||||
--bind "$HOME/.claudebox" "$HOME/.claude" \
|
||||
--bind "$HOME/.claudebox" "$HOME/.claudebox" \
|
||||
--symlink "$HOME/.claudebox" "$HOME/.claude" \
|
||||
--ro-bind "$GITCONFIG_TMP" "$HOME/.gitconfig" \
|
||||
--bind "$CWD" "$CWD" \
|
||||
--chdir "$CWD" \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue