Skip to content

fix(builtins): support file arguments in jq builtin#183

Merged
chaliy merged 2 commits intomainfrom
claude/fix-jq-empty-output-g6SC5
Feb 9, 2026
Merged

fix(builtins): support file arguments in jq builtin#183
chaliy merged 2 commits intomainfrom
claude/fix-jq-empty-output-g6SC5

Conversation

@chaliy
Copy link
Contributor

@chaliy chaliy commented Feb 9, 2026

Summary

  • jq builtin now reads from file arguments when provided (e.g. jq '.' file.json, jq -s '.' *.json)
  • Previously file arguments were silently ignored, causing empty output instead of processing files
  • Missing files return exit code 2 with error message, matching real jq behavior

Test plan

  • Unit tests: single file, multiple files, slurp with files, file not found, subdirectory paths
  • Integration spec tests: jq_file_input, jq_slurp_files
  • All existing jq tests still pass
  • cargo clippy and cargo fmt clean
  • Specs and docs updated

Previously jq only read from stdin, ignoring file arguments entirely.
`jq -s '.' /path/*.json` would produce empty output instead of reading
the files. Now file arguments after the filter are read from the virtual
filesystem, matching real jq behavior. Missing files return exit code 2.

https://claude.ai/code/session_01Snmm1D3pau3UxQMEAQUjXo
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chaliy chaliy merged commit 104c170 into main Feb 9, 2026
9 checks passed
@chaliy chaliy mentioned this pull request Feb 9, 2026
3 tasks
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.

2 participants