Skip to content

fix: replace shell syntax in run() calls with shellRun() and Node APIs#100

Closed
TerminalGravity wants to merge 1 commit intomainfrom
fix/shell-syntax-run-89
Closed

fix: replace shell syntax in run() calls with shellRun() and Node APIs#100
TerminalGravity wants to merge 1 commit intomainfrom
fix/shell-syntax-run-89

Conversation

@TerminalGravity
Copy link
Collaborator

Fixes #89

Several tools passed shell operators (pipes, redirects, ||, 2>/dev/null) to run() which uses execFileSync (no shell), causing silent failures.

Changes:

  • Added shellRun() to git.ts — uses execSync with shell: true for commands needing pipes/redirects
  • token-audit.ts: replaced wc -l/wc -c with fs.readFileSync/statSync (Node APIs > shell)
  • verify-completion.ts: shellRun for tsc, build, and test commands
  • enrich-agent-task.ts: shellRun for git ls-files | grep pipelines
  • scope-work.ts: shellRun for grep pipelines, array args for simple git commands
  • session-handoff.ts: shellRun for command -v and gh CLI

All 43 tests pass, clean build.

Fixes #89 — several tools passed shell operators (pipes, redirects, ||)
to run() which uses execFileSync (no shell), causing silent failures.

Changes:
- Add shellRun() to git.ts using execSync with shell: true
- token-audit: use fs.readFileSync/statSync instead of wc -l/wc -c
- verify-completion: use shellRun for tsc/build/test commands
- enrich-agent-task: use shellRun for git ls-files | grep pipelines
- scope-work: use shellRun for grep pipelines, array args for git
- session-handoff: use shellRun for command -v and gh CLI

Closes #89
@TerminalGravity
Copy link
Collaborator Author

Closing — superseded by #116 which covers all files with the cleaner three-tier approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Several tools pass shell syntax to run() which uses execFileSync

1 participant