|
@@ -277,14 +277,14 @@ func (cli *DockerCli) CmdLogin(args ...string) error {
|
|
// the password or email from the config file, so prompt them
|
|
// the password or email from the config file, so prompt them
|
|
if username != authconfig.Username {
|
|
if username != authconfig.Username {
|
|
if password == "" {
|
|
if password == "" {
|
|
- oldState, _ := term.SaveState(cli.terminalFd)
|
|
|
|
|
|
+ oldState, _ := term.SaveState(cli.inFd)
|
|
fmt.Fprintf(cli.out, "Password: ")
|
|
fmt.Fprintf(cli.out, "Password: ")
|
|
- term.DisableEcho(cli.terminalFd, oldState)
|
|
|
|
|
|
+ term.DisableEcho(cli.inFd, oldState)
|
|
|
|
|
|
password = readInput(cli.in, cli.out)
|
|
password = readInput(cli.in, cli.out)
|
|
fmt.Fprint(cli.out, "\n")
|
|
fmt.Fprint(cli.out, "\n")
|
|
|
|
|
|
- term.RestoreTerminal(cli.terminalFd, oldState)
|
|
|
|
|
|
+ term.RestoreTerminal(cli.inFd, oldState)
|
|
if password == "" {
|
|
if password == "" {
|
|
return fmt.Errorf("Error : Password Required")
|
|
return fmt.Errorf("Error : Password Required")
|
|
}
|
|
}
|
|
@@ -670,7 +670,7 @@ func (cli *DockerCli) CmdStart(args ...string) error {
|
|
}
|
|
}
|
|
|
|
|
|
if *openStdin || *attach {
|
|
if *openStdin || *attach {
|
|
- if tty && cli.isTerminal {
|
|
|
|
|
|
+ if tty && cli.isTerminalOut {
|
|
if err := cli.monitorTtySize(cmd.Arg(0), false); err != nil {
|
|
if err := cli.monitorTtySize(cmd.Arg(0), false); err != nil {
|
|
log.Errorf("Error monitoring TTY size: %s", err)
|
|
log.Errorf("Error monitoring TTY size: %s", err)
|
|
}
|
|
}
|
|
@@ -1822,7 +1822,7 @@ func (cli *DockerCli) CmdAttach(args ...string) error {
|
|
tty = config.GetBool("Tty")
|
|
tty = config.GetBool("Tty")
|
|
)
|
|
)
|
|
|
|
|
|
- if tty && cli.isTerminal {
|
|
|
|
|
|
+ if tty && cli.isTerminalOut {
|
|
if err := cli.monitorTtySize(cmd.Arg(0), false); err != nil {
|
|
if err := cli.monitorTtySize(cmd.Arg(0), false); err != nil {
|
|
log.Debugf("Error monitoring TTY size: %s", err)
|
|
log.Debugf("Error monitoring TTY size: %s", err)
|
|
}
|
|
}
|
|
@@ -2247,7 +2247,7 @@ func (cli *DockerCli) CmdRun(args ...string) error {
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
|
|
|
|
- if (config.AttachStdin || config.AttachStdout || config.AttachStderr) && config.Tty && cli.isTerminal {
|
|
|
|
|
|
+ if (config.AttachStdin || config.AttachStdout || config.AttachStderr) && config.Tty && cli.isTerminalOut {
|
|
if err := cli.monitorTtySize(runResult.Get("Id"), false); err != nil {
|
|
if err := cli.monitorTtySize(runResult.Get("Id"), false); err != nil {
|
|
log.Errorf("Error monitoring TTY size: %s", err)
|
|
log.Errorf("Error monitoring TTY size: %s", err)
|
|
}
|
|
}
|
|
@@ -2496,7 +2496,7 @@ func (cli *DockerCli) CmdExec(args ...string) error {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if execConfig.Tty && cli.isTerminal {
|
|
|
|
|
|
+ if execConfig.Tty && cli.isTerminalIn {
|
|
if err := cli.monitorTtySize(execID, true); err != nil {
|
|
if err := cli.monitorTtySize(execID, true); err != nil {
|
|
log.Errorf("Error monitoring TTY size: %s", err)
|
|
log.Errorf("Error monitoring TTY size: %s", err)
|
|
}
|
|
}
|