mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-03 15:28:35 +00:00
Merge pull request #9211 from mtesselH/login
Fixed a bug - no panic anymore when logining in without TTY
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user