Merge pull request #9211 from mtesselH/login

Fixed a bug - no panic anymore when logining in without TTY
This commit is contained in:
Michael Crosby
2014-11-19 17:52:35 -08:00
2 changed files with 39 additions and 1 deletions
+4 -1
View File
@@ -289,7 +289,10 @@ func (cli *DockerCli) CmdLogin(args ...string) error {
// the password or email from the config file, so prompt them
if username != authconfig.Username {
if password == "" {
oldState, _ := term.SaveState(cli.inFd)
oldState, err := term.SaveState(cli.inFd)
if err != nil {
return err
}
fmt.Fprintf(cli.out, "Password: ")
term.DisableEcho(cli.inFd, oldState)