Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix(cua-driver): fail safely when Claude ownership cannot be inspected

umutcagandf7ff44aba1e8
diff --git a/libs/cua-driver/scripts/uninstall.sh b/libs/cua-driver/scripts/uninstall.sh
index 6d35cf80ee..933dd936b5 100755
--- a/libs/cua-driver/scripts/uninstall.sh
+++ b/libs/cua-driver/scripts/uninstall.sh
@@ -553,6 +553,16 @@ if [[ "$USE_RUST_BACKEND" == "1" ]]; then
RUST_INSTALL_PRESENT=1
fi
+ # Ownership-aware Claude cleanup currently uses Python's JSON + realpath
+ # support. If a Claude config exists but Python is unavailable, stop before
+ # touching the release so uninstall cannot report success while leaving a
+ # current shared-name registration behind.
+ CLAUDE_JSON="$HOME/.claude.json"
+ if [[ -f "$CLAUDE_JSON" ]] && ! command -v python3 >/dev/null 2>&1; then
+ printf 'error: python3 is required to safely inspect Claude MCP ownership before uninstalling a release with %s; install python3 and retry. No release files were removed.\n' "$CLAUDE_JSON" >&2
+ exit 1
+ fi
+
DAEMON_PID_FILE="$(daemon_pid_file_path)"
DAEMON_STOP_HELPER="$(select_daemon_stop_helper || true)"