From 6fcd4b37ba74e6f69eb032a3ce08b826463c5994 Mon Sep 17 00:00:00 2001 From: Brian Hanson Date: Wed, 15 Apr 2026 02:57:40 +0000 Subject: [PATCH] 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) --- system/clearpilot/provision.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/system/clearpilot/provision.sh b/system/clearpilot/provision.sh index c9b661b..f6dbce4 100644 --- a/system/clearpilot/provision.sh +++ b/system/clearpilot/provision.sh @@ -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)