Skip to content

Commit 8c20ab5

Browse files
LTSCommerceclaude
andcommitted
fix: resolve paths to absolute in deploy-skills for monorepo support
dirname "." returns "." not the parent directory. When deploy-skills.bash is called with relative paths (e.g., PROJECT_ROOT="."), the monorepo parent directory detection fails because dirname doesn't traverse up. Fix: resolve both QACI_PATH and PROJECT_ROOT to absolute paths via realpath before any dirname operations. Also fix daemon venv python detection to check parent directory in monorepo setups. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9f9413e commit 8c20ab5

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

scripts/deploy-skills.bash

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ if [[ -z "$QACI_PATH" || -z "$PROJECT_ROOT" ]]; then
1010
exit 1
1111
fi
1212

13+
# Resolve to absolute paths so dirname works correctly (dirname "." = "." not parent)
14+
QACI_PATH="$(realpath "$QACI_PATH")"
15+
PROJECT_ROOT="$(realpath "$PROJECT_ROOT")"
16+
1317
SKILLS_SOURCE="$QACI_PATH/.claude/skills"
1418
SKILLS_TARGET="$PROJECT_ROOT/.claude/skills"
1519
AGENTS_SOURCE="$QACI_PATH/.claude/agents"
@@ -32,10 +36,14 @@ fi
3236

3337
# Detect daemon venv python3 for yaml operations (has pyyaml installed)
3438
# Fall back to system python3 if venv not found
39+
# Support monorepo: check both project root and parent directory for venv
3540
PYTHON3_YAML="python3"
3641
DAEMON_VENV_PYTHON="$PROJECT_ROOT/.claude/hooks-daemon/untracked/venv/bin/python3"
42+
DAEMON_VENV_PYTHON_PARENT="$(dirname "$PROJECT_ROOT")/.claude/hooks-daemon/untracked/venv/bin/python3"
3743
if [[ -f "$DAEMON_VENV_PYTHON" ]]; then
3844
PYTHON3_YAML="$DAEMON_VENV_PYTHON"
45+
elif [[ -f "$DAEMON_VENV_PYTHON_PARENT" ]]; then
46+
PYTHON3_YAML="$DAEMON_VENV_PYTHON_PARENT"
3947
fi
4048

4149
echo "Deploying Skills from: $SKILLS_SOURCE"

0 commit comments

Comments
 (0)