From c7f2736592ea1755062327847062b7c56a5d5e23 Mon Sep 17 00:00:00 2001 From: Harry Whelchel Date: Fri, 20 Mar 2026 16:14:12 -0400 Subject: [PATCH] fix: zsh glob compatibility in skill preamble When no .pending-* files exist, zsh throws "no matches found" and exits with code 1 (bash silently expands to nothing). Wrap the glob in `$(ls ... 2>/dev/null)` so it works in both shells. Note: Generated SKILL.md files need regeneration with `bun run gen:skill-docs` to pick up this fix. Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/gen-skill-docs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gen-skill-docs.ts b/scripts/gen-skill-docs.ts index 53e8834f..a3ec90c2 100644 --- a/scripts/gen-skill-docs.ts +++ b/scripts/gen-skill-docs.ts @@ -162,7 +162,7 @@ echo "TELEMETRY: \${_TEL:-off}" echo "TEL_PROMPTED: $_TEL_PROMPTED" mkdir -p ~/.gstack/analytics echo '{"skill":"${ctx.skillName}","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> ~/.gstack/analytics/skill-usage.jsonl 2>/dev/null || true -for _PF in ~/.gstack/analytics/.pending-*; do [ -f "$_PF" ] && ${ctx.paths.binDir}/gstack-telemetry-log --event-type skill_run --skill _pending_finalize --outcome unknown --session-id "$_SESSION_ID" 2>/dev/null || true; break; done +for _PF in $(ls ~/.gstack/analytics/.pending-* 2>/dev/null); do [ -f "$_PF" ] && ${ctx.paths.binDir}/gstack-telemetry-log --event-type skill_run --skill _pending_finalize --outcome unknown --session-id "$_SESSION_ID" 2>/dev/null || true; break; done \`\`\``; }