feat: Add stream option for real-time output without requiring TTY#1180
Open
jasonwbarnett wants to merge 1 commit intoevilmartians:masterfrom
Open
feat: Add stream option for real-time output without requiring TTY#1180jasonwbarnett wants to merge 1 commit intoevilmartians:masterfrom
jasonwbarnett wants to merge 1 commit intoevilmartians:masterfrom
Conversation
Add a new stream configuration option that enables real-time log streaming without requiring a TTY. This solves the issue where using interactive: true in non-TTY environments (like VS Code's commit interface) would fail with "Couldn't enable TTY input: open /dev/tty: device not configured". Key differences: - stream: true - Real-time output, no TTY required, no user input - interactive: true - Requires TTY for user input Changes: - Add Stream field to Command, Script, and Job config structs - Update exec.Options to include Stream parameter - Modify exec_unix.go and exec_windows.go to handle Stream mode - Update JSON schemas with new stream property - Add comprehensive documentation for the stream feature 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Member
|
Hey! Thank you for preparing the PR. Have you seen the |
Contributor
Author
|
No, I had not seen follow 🫠 I'll try it out today and let you know if I have issues. Thanks! |
Contributor
Author
|
It would be nice to control this on a per job basis though instead of the entire hook. |
Member
|
Agree, but maybe it will require to change the order of jobs and delay printing the output of those without |
Contributor
Author
|
Re-opened! 😄 Let me know if you think we need to make any changes to the source or docs, etc. Happy to work with you to get this in. Also, let me know if you think. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1179
Context
Currently, using
interactive: truein non-TTY environments (like VS Code's commit interface, GitHub Desktop, or CI/CD pipelines) fails with the error:This happens because
interactive: trueattempts to open/dev/ttyfor user input, which doesn't exist in these environments. Users who want real-time streaming output but don't need user input have no good alternative.Changes
This PR adds a new
streamconfiguration option that enables real-time log streaming without requiring a TTY:streamfield to Command, Script, and Job config structsexec_unix.goandexec_windows.goto handle stream mode/dev/ttyinteractive: trueattempts TTY access;stream: trueworks in all environmentsstreampropertydocs/mdbook/configuration/stream.mdKey differences:
stream: true- Real-time output, no TTY required, no user inputinteractive: true- Requires TTY for user inputuse_stdin: true- Passes stdin but doesn't control output streamingExample usage:
This allows developers to see test and lint output in real-time when committing from VS Code or other non-TTY environments, without encountering TTY errors.