[GH-ISSUE #163] Upgrade structured-mode swaps stdout/stderr stream wiring #114

Closed
opened 2026-10-15 18:21:15 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @morluto on GitHub (Jul 14, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/163

Summary

runCommand used by upgrade currently wires child process stdio so structured mode redirects child stdout into parent stderr and makes stderr inherit parent stdout, reversing output channels.

Evidence

  • src/application/Upgrade.ts:198:
    • stdio: output === "human" ? "inherit" : ["inherit", process.stderr, "inherit"]

spawn(..., stdio: [stdin, stdout, stderr]) should likely be ["inherit", "pipe"/"inherit", "inherit"] for structured mode, not swapped.

Impact

Upgrade structured JSON mode can lose or mislabel command output, making failure diagnostics unreliable and potentially hiding command stderr text in the wrong stream.

Originally created by @morluto on GitHub (Jul 14, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/163 ## Summary `runCommand` used by upgrade currently wires child process stdio so structured mode redirects child stdout into parent stderr and makes stderr inherit parent stdout, reversing output channels. ## Evidence - `src/application/Upgrade.ts:198`: - `stdio: output === "human" ? "inherit" : ["inherit", process.stderr, "inherit"]` `spawn(..., stdio: [stdin, stdout, stderr])` should likely be `["inherit", "pipe"/"inherit", "inherit"]` for structured mode, not swapped. ## Impact Upgrade structured JSON mode can lose or mislabel command output, making failure diagnostics unreliable and potentially hiding command stderr text in the wrong stream.
bsakaguchi 2026-10-15 18:21:15 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#114
No description provided.