mirror of https://github.com/docker/docs.git
Merge remote-tracking branch 'origin/fix_flush_behaviour'
This commit is contained in:
commit
2e9a73c5d8
12
commands.go
12
commands.go
|
@ -419,7 +419,8 @@ func (srv *Server) CmdKill(stdin io.ReadCloser, stdout io.Writer, args ...string
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (srv *Server) CmdImport(stdin io.ReadCloser, stdout io.Writer, args ...string) error {
|
func (srv *Server) CmdImport(stdin io.ReadCloser, stdout rcli.DockerConn, args ...string) error {
|
||||||
|
stdout.Flush()
|
||||||
cmd := rcli.Subcmd(stdout, "import", "[OPTIONS] URL|- [REPOSITORY [TAG]]", "Create a new filesystem image from the contents of a tarball")
|
cmd := rcli.Subcmd(stdout, "import", "[OPTIONS] URL|- [REPOSITORY [TAG]]", "Create a new filesystem image from the contents of a tarball")
|
||||||
var archive io.Reader
|
var archive io.Reader
|
||||||
var resp *http.Response
|
var resp *http.Response
|
||||||
|
@ -803,9 +804,9 @@ func (srv *Server) CmdAttach(stdin io.ReadCloser, stdout rcli.DockerConn, args .
|
||||||
|
|
||||||
if container.Config.Tty {
|
if container.Config.Tty {
|
||||||
stdout.SetOptionRawTerminal()
|
stdout.SetOptionRawTerminal()
|
||||||
// Flush the options to make sure the client sets the raw mode
|
|
||||||
stdout.Write([]byte{})
|
|
||||||
}
|
}
|
||||||
|
// Flush the options to make sure the client sets the raw mode
|
||||||
|
stdout.Flush()
|
||||||
return <-container.Attach(stdin, nil, stdout, stdout)
|
return <-container.Attach(stdin, nil, stdout, stdout)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -893,9 +894,10 @@ func (srv *Server) CmdRun(stdin io.ReadCloser, stdout rcli.DockerConn, args ...s
|
||||||
|
|
||||||
if config.Tty {
|
if config.Tty {
|
||||||
stdout.SetOptionRawTerminal()
|
stdout.SetOptionRawTerminal()
|
||||||
// Flush the options to make sure the client sets the raw mode
|
|
||||||
stdout.Flush()
|
|
||||||
}
|
}
|
||||||
|
// Flush the options to make sure the client sets the raw mode
|
||||||
|
// or tell the client there is no options
|
||||||
|
stdout.Flush()
|
||||||
|
|
||||||
// Create new container
|
// Create new container
|
||||||
container, err := srv.runtime.Create(config)
|
container, err := srv.runtime.Create(config)
|
||||||
|
|
|
@ -93,7 +93,7 @@ func (c *DockerTCPConn) Write(b []byte) (int, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *DockerTCPConn) Flush() error {
|
func (c *DockerTCPConn) Flush() error {
|
||||||
_, err := c.conn.Write([]byte{})
|
_, err := c.Write([]byte{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue