fix: use wrapper script for claude instead of PATH modification
Create /usr/local/bin/claude wrapper that remounts / read-write before calling the real binary. Removes PATH append to ~/.bashrc which was duplicating on every provision run. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -38,7 +38,12 @@ sudo apt-get install -y nodejs
|
||||
mount -o rw,remount /
|
||||
echo "Installing Claude Code..."
|
||||
curl -fsSL https://claude.ai/install.sh | bash
|
||||
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
|
||||
cat > /usr/local/bin/claude <<'WRAPPER'
|
||||
#!/bin/bash
|
||||
sudo mount -o rw,remount /
|
||||
exec /root/.local/bin/claude "$@"
|
||||
WRAPPER
|
||||
chmod +x /usr/local/bin/claude
|
||||
echo "Packages installed"
|
||||
|
||||
# Decrypt and install SSH identity keys (for git auth)
|
||||
|
||||
Reference in New Issue
Block a user