{{ message }}
Repository navigation
Fix Terminal::TryGetBackgroundColor when stdin is reading from a pipe but stdout is still writing to the terminal - #21288
Merged
Conversation
… but stdout is still writing to the terminal
2 tasks done
2 tasks done
github-actions Bot
pushed a commit
to duckdb/duckdb-r
that referenced
this pull request
Mar 18, 2026
Date: 2026-03-12 09:43:16 +0100 Add batch index support to parquet_metadata and friends to allow it to be executed in parallel also with order preservation (duckdb/duckdb#21314) Fix duckdb/duckdb#21248: correctly expand type count in CSV header detection (duckdb/duckdb#21292) Fix Terminal::TryGetBackgroundColor when stdin is reading from a pipe but stdout is still writing to the terminal (duckdb/duckdb#21288)
github-actions Bot
added a commit
to duckdb/duckdb-r
that referenced
this pull request
Mar 18, 2026
Date: 2026-03-12 09:43:16 +0100 Add batch index support to parquet_metadata and friends to allow it to be executed in parallel also with order preservation (duckdb/duckdb#21314) Fix duckdb/duckdb#21248: correctly expand type count in CSV header detection (duckdb/duckdb#21292) Fix Terminal::TryGetBackgroundColor when stdin is reading from a pipe but stdout is still writing to the terminal (duckdb/duckdb#21288) Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
krlmlr
added a commit
to duckdb/duckdb-r
that referenced
this pull request
Mar 22, 2026
Date: 2026-03-12 09:43:16 +0100 Add batch index support to parquet_metadata and friends to allow it to be executed in parallel also with order preservation (duckdb/duckdb#21314) Fix duckdb/duckdb#21248: correctly expand type count in CSV header detection (duckdb/duckdb#21292) Fix Terminal::TryGetBackgroundColor when stdin is reading from a pipe but stdout is still writing to the terminal (duckdb/duckdb#21288) Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
krlmlr
added a commit
to krlmlr/duckdb-r-old
that referenced
this pull request
Mar 22, 2026
Date: 2026-03-12 09:43:16 +0100 Add batch index support to parquet_metadata and friends to allow it to be executed in parallel also with order preservation (duckdb/duckdb#21314) Fix duckdb/duckdb#21248: correctly expand type count in CSV header detection (duckdb/duckdb#21292) Fix Terminal::TryGetBackgroundColor when stdin is reading from a pipe but stdout is still writing to the terminal (duckdb/duckdb#21288) Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
krlmlr
added a commit
to krlmlr/duckdb-r-old
that referenced
this pull request
Mar 22, 2026
Date: 2026-03-12 09:43:16 +0100 Add batch index support to parquet_metadata and friends to allow it to be executed in parallel also with order preservation (duckdb/duckdb#21314) Fix duckdb/duckdb#21248: correctly expand type count in CSV header detection (duckdb/duckdb#21292) Fix Terminal::TryGetBackgroundColor when stdin is reading from a pipe but stdout is still writing to the terminal (duckdb/duckdb#21288) Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
kaka11chen
pushed a commit
to AstroVela/vane
that referenced
this pull request
Aug 14, 2026
… but stdout is still writing to the terminal (duckdb/duckdb#21288) Fixes duckdb/duckdb#21243 and duckdb/duckdb#21245. Supersedes duckdb/duckdb#21247 Currently when piping `stdin` to the shell, but not piping `stdout`, `linenoiseGetTerminalColorMode` consumes all available input by calling `Terminal::BufferAvailableInput()` - causing no commands to be executed. This PR adjusts `linenoiseGetTerminalColorMode` to correctly work when `stdin` is not a terminal by explicitly opening `/dev/tty` and running on that instead. Upstream-Commit: duckdb/duckdb@12bebb9
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.

Fixes #21243 and #21245.
Supersedes #21247
Currently when piping
stdinto the shell, but not pipingstdout,linenoiseGetTerminalColorModeconsumes all available input by callingTerminal::BufferAvailableInput()- causing no commands to be executed. This PR adjustslinenoiseGetTerminalColorModeto correctly work whenstdinis not a terminal by explicitly opening/dev/ttyand running on that instead.