mirror of
https://github.com/docker/cli.git
synced 2026-08-24 10:05:37 -05:00
Merge pull request #7082 from thaJeztah/prompt_cleans_step1
internal/prompt: Confirm: don't wrap stdIn
This commit is contained in:
@@ -88,8 +88,18 @@ func Confirm(ctx context.Context, in io.Reader, out io.Writer, message string) (
|
|||||||
_, _ = out.Write([]byte(message))
|
_, _ = out.Write([]byte(message))
|
||||||
|
|
||||||
// On Windows, force the use of the regular OS stdin stream.
|
// On Windows, force the use of the regular OS stdin stream.
|
||||||
|
//
|
||||||
|
// StdStreams() may wrap stdin with windowsconsole.NewAnsiReader to
|
||||||
|
// emulate VT input on consoles that do not support it natively, but
|
||||||
|
// that wrapper has historically caused interactive prompts to hang
|
||||||
|
// or behave incorrectly.
|
||||||
|
//
|
||||||
|
// See:
|
||||||
|
// - https://github.com/moby/moby/issues/14336
|
||||||
|
// - https://github.com/moby/moby/issues/14210
|
||||||
|
// - https://github.com/moby/moby/pull/17738
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
in = streams.NewIn(os.Stdin)
|
in = os.Stdin
|
||||||
}
|
}
|
||||||
|
|
||||||
result := make(chan bool)
|
result := make(chan bool)
|
||||||
|
|||||||
Reference in New Issue
Block a user