Commit 17bdd88
committed
fix(cli): write JSON output to stdout instead of stderr
Fixes bounty issue #1495
When using --json or --jsonl output format, JSON event objects were being
written to stderr (eprintln!) instead of stdout (println!). This caused
malformed output when piping to tools like jq, as the JSON events would
appear in the terminal while the final result was piped to the destination.
Changed eprintln! to println! for JSON event output and error JSON output
to ensure all JSON data goes to stdout for proper piping support.1 parent 8f839ec commit 17bdd88
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
557 | | - | |
| 557 | + | |
558 | 558 | | |
559 | 559 | | |
560 | | - | |
| 560 | + | |
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
| |||
636 | 636 | | |
637 | 637 | | |
638 | 638 | | |
639 | | - | |
| 639 | + | |
640 | 640 | | |
641 | 641 | | |
642 | 642 | | |
| |||
0 commit comments