Skip to content

Conversation

@davidtaylorhq
Copy link
Member

Previously the stdout of commands was buffered in memory, and then logged when it was finished. Meanwhile, the stderr of a command was being streamed straight out. This leads to some very surprising output when commands mix stdout & stderr (e.g. rails database migration errors).

Now, stdout and stderr are passed straight through, so long-running command output appears in real-time, and correctly ordered.

For the simple case, a system() call would work. But we need to handle the stdin option, which is why we need the extra complexity and Process.spawn.

Previously the stdout of commands was buffered in memory, and then logged when it was finished. Meanwhile, the stderr of a command was being streamed straight out. This leads to some very surprising output when commands mix stdout & stderr (e.g. rails database migration errors).

Now, stdout and stderr are passed straight through, so long-running command output appears in real-time, and correctly ordered.

For the simple case, a `system()` call would work. But we need to handle the `stdin` option, which is why we need the extra complexity and `Process.spawn`.
@davidtaylorhq davidtaylorhq merged commit 103a50a into main Jan 8, 2026
3 checks passed
@davidtaylorhq davidtaylorhq deleted the stdout-streaming branch January 8, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants