Merge branch 'main' into fix/apm-audit-git-env

This commit is contained in:
Defame1297 committed 2026-11-27 08:04:05 +00:00
commit 2c6e82747c
2 files changed
+40 -3

No files matched your search

+6 -3
View File
@@ -58,15 +58,18 @@ if ! command -v python3 >/dev/null 2>&1; then
fi
# --- Discover the agent files ---
# `-not -path` mirrors tests/run-bats.sh: worktrees under .claude/ are other
# checkouts of this same repo, not additional content.
# No `.claude/worktrees` exclusion, unlike tests/run-bats.sh: the walk starts at
# $REPO_ROOT/plugins, so a worktree nested at $REPO_ROOT/.claude/worktrees/ is
# unreachable and there is nothing to exclude. A `-not -path` glob here would
# match against ABSOLUTE paths, and when this checkout is itself a Claude
# worktree (<repo>/.claude/worktrees/<name>/) every path contains that segment,
# so it excluded every agent file and failed the derived check below (#199).
AGENT_FILES=()
while IFS= read -r f; do
[[ -n "$f" ]] && AGENT_FILES+=("$f")
done < <(
find "$REPO_ROOT/plugins" -type f -name '*.agent.md' \
-path '*/.apm/agents/*' \
-not -path '*/.claude/worktrees/*' \
2>/dev/null | sort
)