fix: replace source <(gstack-slug) with eval for bash compatibility

Under bash with set -euo pipefail, source <(cmd) process substitution
doesn't reliably set variables in the caller's scope. The variables
stay empty and -u (nounset) crashes the script. eval "$(cmd)" works
correctly in both bash and zsh.

Fixes: gstack-review-read, gstack-review-log, gstack-slug comment,
gen-skill-docs.ts resolver functions, and regression tests.
This commit is contained in:
Garry Tan
2026-03-22 20:57:49 -07:00
parent 4cd4d11cb0
commit e877d3d870
28 changed files with 72 additions and 43 deletions
+1 -1
View File
@@ -333,7 +333,7 @@ When the user types `/benchmark`, run this skill.
### Phase 1: Setup
```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null || echo "SLUG=unknown")
eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null || echo "SLUG=unknown")"
mkdir -p .gstack/benchmark-reports
mkdir -p .gstack/benchmark-reports/baselines
```
+1 -1
View File
@@ -41,7 +41,7 @@ When the user types `/benchmark`, run this skill.
### Phase 1: Setup
```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null || echo "SLUG=unknown")
eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null || echo "SLUG=unknown")"
mkdir -p .gstack/benchmark-reports
mkdir -p .gstack/benchmark-reports/baselines
```