fix(input-json): only read stdin with explicit --input-json -#341
fix(input-json): only read stdin with explicit --input-json -#341rafa-thayto wants to merge 1 commit into
--input-json -#341Conversation
🦋 Changeset detectedLatest commit: e8a1e1b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthrough
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Implicit stdin consumption (when stdin was not a TTY) parsed any piped data as the --input-json options payload, breaking `while read` loops and commands that read their own stdin (e.g. `cat body.json | clerk api`). Require the explicit `--input-json -` marker instead. Fixes #333
57f7feb to
e8a1e1b
Compare
Summary
In agent mode the program-level
--input-jsonexpander consumed any non-TTY stdin and parsed it as the options payload, even when--input-jsonwas never passed. That broke two common patterns:Non-JSON stdin then failed with
invalid_jsonbefore the command ran. This makes stdin read only with an explicit--input-json -; piped stdin is otherwise left untouched.Test plan
bun test src/lib/input-json.test.tsandsrc/test/integration/input-json.test.tspass--input-json -Fixes #333