From 13de992638c56ab46507f57b70ec95b50f70644c Mon Sep 17 00:00:00 2001 From: lmiranda Date: Mon, 2 Feb 2026 22:38:27 -0500 Subject: [PATCH] fix(hooks): add auto-symlink creation in data-platform startup hook Note: This fix may not help because MCP servers fail BEFORE hooks run. See lessons learned wiki page for full debug trace. Co-Authored-By: Claude Opus 4.5 --- plugins/data-platform/hooks/startup-check.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/data-platform/hooks/startup-check.sh b/plugins/data-platform/hooks/startup-check.sh index ed861c7..3cbb200 100755 --- a/plugins/data-platform/hooks/startup-check.sh +++ b/plugins/data-platform/hooks/startup-check.sh @@ -11,9 +11,17 @@ PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(dirname "$(dirname "$(realpath "$0")")")}" MARKETPLACE_ROOT="$(dirname "$(dirname "$PLUGIN_ROOT")")" LOCAL_VENV="$MARKETPLACE_ROOT/mcp-servers/data-platform/.venv/bin/python" -# Check cache first (preferred), then local +# Check cache first (preferred), then local symlink +CACHE_VENV_DIR="$HOME/.cache/claude-mcp-venvs/leo-claude-mktplace/data-platform/.venv" +LOCAL_VENV_DIR="$MARKETPLACE_ROOT/mcp-servers/data-platform/.venv" + if [[ -f "$CACHE_VENV" ]]; then VENV_PATH="$CACHE_VENV" + # Auto-create symlink in installed marketplace if missing + if [[ ! -e "$LOCAL_VENV_DIR" && -d "$CACHE_VENV_DIR" ]]; then + mkdir -p "$(dirname "$LOCAL_VENV_DIR")" 2>/dev/null + ln -sf "$CACHE_VENV_DIR" "$LOCAL_VENV_DIR" 2>/dev/null + fi elif [[ -f "$LOCAL_VENV" ]]; then VENV_PATH="$LOCAL_VENV" else