Conversation
Forward terminal input to the cloud context provider when stdin and stderr are terminals so it can prompt during resolution. Pass the terminal files directly to preserve terminal detection and avoid intermediary buffering; piped or redirected input stays available to the requested command. Cover interactive resolution and input preservation with subprocess tests. Signed-off-by: Nicolas Beck <nicolas.beck@docker.com>
Simplify the shell fixture conditional to avoid a duplicate-word lint warning while preserving the input-consumption checks. Signed-off-by: Nicolas Beck <nicolas.beck@docker.com>
Use standard console handles when terminal emulation hides the underlying files. Preserve explicit file streams and leave noninteractive input for the requested command. Signed-off-by: Nicolas Beck <nicolas.beck@docker.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
docker-agent
reviewed
Oct 5, 2026
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
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.
Related to #7354 and its Windows console review.
Summary
Allow interactive
--cloudcontext resolution when Windows console streams are wrapped for terminal emulation. Those streams can reportIsTerminal() == truewithout exposing an underlying file, preventing the resolver from receiving stdin.Use the corresponding standard handle on Windows only when the stream has no file. Preserve explicitly supplied file streams and require both stdin and stderr to be terminals. Piped or redirected input remains available to the requested command, and stdout remains reserved for the resolver's JSON response.
This draft includes the changes from #7354 and keeps the Windows fix on a separate branch for validation.
Validation:
go test ./cmd/dockerand lint pass. The CLI and focused stream tests cross-compile for Windows amd64 and arm64; regression coverage includes wrapped streams, explicit files, and nonterminal streams. The full unit suite has the previously reproducedTestNodeAddrOptionSetHostOnlyIPv6failure with Go 1.26.0. Existingsyscall.Killtests prevent compiling the complete command test package for Windows, so the focused tests were compiled separately. Windows runtime and console verification are pending.