Skip to content

Widespread shell syntax in run() calls after execFileSync migration #110

Description

@TerminalGravity

Problem

run() in src/lib/git.ts uses execFileSync (no shell), but many tool files still pass shell syntax that silently breaks:

  • Shell operators: ||, &&, |
  • Redirects: 2>/dev/null, 2>&1
  • Prefixing git in strings (becomes a literal arg since execFileSync('git', ['git', ...]))
  • Shell quoting/escaping

Affected files

PR #109 fixes 3 files. These still need fixing:

  • verify-completion.tscat, tsc --noEmit 2>&1 | tail, npm run build 2>&1 | tail
  • token-audit.tswc -l, wc -c, tail -c, 2>/dev/null
  • clarify-intent.tstsc --noEmit 2>&1 | grep, find ... | head
  • session-handoff.tscommand -v, gh pr list ... || echo
  • audit-workspace.tsfind ... | wc -l, 2>/dev/null
  • enrich-agent-task.tsgit ls-files | grep, head -30
  • scope-work.tsgit ls-files | head | grep
  • sequence-tasks.tsgit ls-files | head

Options

  1. Fix each caller to use array args + JS logic (like PR fix: shell syntax bugs in what-changed, checkpoint, session-health #109)
  2. Add a shell() helper that uses execSync for commands that genuinely need shell features
  3. Both — array args where simple, shell() for complex piping

Option 3 is probably best. Some commands (find | grep | head) are genuinely easier with shell.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions