Skip to content

fix(jq): return ExecResult::err instead of Error::Execution for stderr suppression#298

Merged
chaliy merged 1 commit intomainfrom
claude/issue-277-jq-stderr-76a2F
Feb 26, 2026
Merged

fix(jq): return ExecResult::err instead of Error::Execution for stderr suppression#298
chaliy merged 1 commit intomainfrom
claude/issue-277-jq-stderr-76a2F

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Feb 26, 2026

Summary

  • jq builtin returned Err(Error::Execution(...)) for parse/runtime errors
  • This bypassed apply_redirections, so 2>/dev/null couldn't suppress errors
  • Changed all error paths to return Ok(ExecResult::err(...)) with non-zero exit code
  • Errors now flow through normal redirect handling

Test plan

  • issue_277_jq_stderr_suppressedjq '.foo' 2>/dev/null suppresses error
  • All 41 existing jq unit tests pass (updated 5 that expected is_err())

Closes #277

@chaliy chaliy merged commit cbbabf0 into main Feb 26, 2026
16 checks passed
@chaliy chaliy deleted the claude/issue-277-jq-stderr-76a2F branch March 12, 2026 03:41
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.

bug: jq stderr output cannot be suppressed via 2>/dev/null

2 participants