Skip to content

fix(#302): remove shell syntax from run() calls in 4 tools#303

Open
TerminalGravity wants to merge 2 commits intomainfrom
fix/shell-syntax-302-batch2
Open

fix(#302): remove shell syntax from run() calls in 4 tools#303
TerminalGravity wants to merge 2 commits intomainfrom
fix/shell-syntax-302-batch2

Conversation

@TerminalGravity
Copy link
Collaborator

Fixes shell syntax passed to run() (which uses execFileSync without a shell) in:

  • sharpen-followup.ts — replaced string commands with array args and proper getDiffFiles/getStagedFiles helpers
  • checkpoint.ts — replaced shell-chained addCmd && git commit with sequential run() array calls
  • session-handoff.ts — replaced command -v via run() with execFileSync('which'); replaced gh pr list string with proper execFileSync('gh') call
  • sequence-tasks.ts — replaced piped git ls-files | head with array call + JS slice

Part of #302. Batch 2 (following PR #301 which fixed what-changed.ts).

run() uses execFileSync without a shell, so shell operators like
2>/dev/null and || were being passed as literal git arguments, causing
silent failures. Replace with proper array args and existing git.ts
helpers (getDiffFiles) with built-in fallback logic.
Convert sharpen-followup, checkpoint, session-handoff, and
sequence-tasks to use array args with run() or execFileSync
directly for non-git commands. Eliminates silent failures from
shell operators (2>/dev/null, pipes, ||) being passed as literal
args to execFileSync.

Part of #302.
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.

1 participant