From 469941b5d2799b4f1e3d9974785c0968f029f70d Mon Sep 17 00:00:00 2001 From: Typo Fix Bot Date: Fri, 5 Jun 2026 06:02:06 +0000 Subject: [PATCH 1/2] fix(install): count agents/skills/hooks from the resolver output The install summary was using `ls`/`wc` on the destination filesystem to count agents, skills, and hooks. That undercounts because the kit ships the same content under both `.claude/` and `.codex/`, and the previous counter only walked `.claude/`. The summary also claimed "(Claude Code + Codex)" while only counting Claude. Drive the counts off `$FILES`, the resolver output that the install loop just wrote to `.vc-installed-files`. That output is the authoritative list of what the manifest produced, so the summary now matches reality across both runtimes and is independent of `ls`/`wc` quirks on the host. Smoke-tested the regex on a small fixture: AGENT=3 (matches .claude/agents/* + .codex/agents/*) SKILL=3 (matches SKILL.md anywhere) HOOK=3 (matches top-level *.cjs under any hooks/ dir) --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 5cef82b..698580d 100755 --- a/install.sh +++ b/install.sh @@ -160,9 +160,9 @@ cleanup # ══════════════════════════════════════════════════════ # Summary # ══════════════════════════════════════════════════════ -AGENT_COUNT=$(ls .claude/agents/*.md 2>/dev/null | wc -l | tr -d ' ') -SKILL_COUNT=$(ls -d .claude/skills/*/ 2>/dev/null | wc -l | tr -d ' ') -HOOK_COUNT=$(ls .claude/hooks/*.cjs 2>/dev/null | wc -l | tr -d ' ') +AGENT_COUNT=$(echo "$FILES" | grep -E '^\.(claude|codex)/agents/' | wc -l | tr -d ' ') +SKILL_COUNT=$(echo "$FILES" | grep -E '/SKILL\.md$' | wc -l | tr -d ' ') +HOOK_COUNT=$(echo "$FILES" | grep -E '/hooks/[^/]+\.cjs$' | wc -l | tr -d ' ') echo "" echo -e " ${GREEN}Install complete.${NC} (v$VERSION)" From 427f9046b129772b88bea9217f445aacc74fb23e Mon Sep 17 00:00:00 2001 From: Arvuno Date: Fri, 5 Jun 2026 06:40:43 +0000 Subject: [PATCH 2/2] fix(install): tolerate zero-match grep with pipefail `set -o pipefail` was aborting the installer when a category had no matches. Append `|| true` to the grep stage so `wc -l` can still report 0. Reported-by: CodeRabbit review (PR #17, major) --- install.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 698580d..c3e3852 100755 --- a/install.sh +++ b/install.sh @@ -160,9 +160,12 @@ cleanup # ══════════════════════════════════════════════════════ # Summary # ══════════════════════════════════════════════════════ -AGENT_COUNT=$(echo "$FILES" | grep -E '^\.(claude|codex)/agents/' | wc -l | tr -d ' ') -SKILL_COUNT=$(echo "$FILES" | grep -E '/SKILL\.md$' | wc -l | tr -d ' ') -HOOK_COUNT=$(echo "$FILES" | grep -E '/hooks/[^/]+\.cjs$' | wc -l | tr -d ' ') +# grep | wc -l: with `set -o pipefail`, a zero-match grep exits 1 and would +# abort the installer. Tolerate zero matches by appending `|| true` to the +# grep stage only — `wc -l` still returns 0 when no lines match. +AGENT_COUNT=$( (echo "$FILES" | grep -E '^\.(claude|codex)/agents/' || true) | wc -l | tr -d ' ') +SKILL_COUNT=$( (echo "$FILES" | grep -E '/SKILL\.md$' || true) | wc -l | tr -d ' ') +HOOK_COUNT=$( (echo "$FILES" | grep -E '/hooks/[^/]+\.cjs$' || true) | wc -l | tr -d ' ') echo "" echo -e " ${GREEN}Install complete.${NC} (v$VERSION)"