Skip to content

fix(what-changed): use array args instead of shell syntax in run() calls#301

Open
TerminalGravity wants to merge 1 commit intomainfrom
fix/what-changed-shell-args
Open

fix(what-changed): use array args instead of shell syntax in run() calls#301
TerminalGravity wants to merge 1 commit intomainfrom
fix/what-changed-shell-args

Conversation

@TerminalGravity
Copy link
Collaborator

@TerminalGravity TerminalGravity commented Mar 20, 2026

Problem

what-changed.ts was passing shell syntax (2>/dev/null, || operators) to run(), which uses execFileSync without a shell. These shell operators were passed as literal git arguments, causing silent failures.

Fix

  • Replace string-based run() calls with getDiffFiles(ref) helper (already has proper fallback logic)
  • Replace run(git log ... || ...) with array args + explicit fallback check

Related: #302 (broader cleanup of shell syntax across all tools)

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.
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