mirror of https://github.com/docker/docs.git
changed scanf's with fscanf's, so it works better for remote
This commit is contained in:
parent
be20f3c518
commit
5e79c4394a
|
@ -84,16 +84,16 @@ func (srv *Server) CmdLogin(stdin io.ReadCloser, stdout io.Writer, args ...strin
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Fprint(stdout, "Username (", authConfig.Username, "): ")
|
fmt.Fprint(stdout, "Username (", authConfig.Username, "): ")
|
||||||
fmt.Scanf("%s", &username)
|
fmt.Fscanf(stdin, "%s", &username)
|
||||||
if username == "" {
|
if username == "" {
|
||||||
username = authConfig.Username
|
username = authConfig.Username
|
||||||
}
|
}
|
||||||
if username != authConfig.Username {
|
if username != authConfig.Username {
|
||||||
fmt.Fprint(stdout, "Password: ")
|
fmt.Fprint(stdout, "Password: ")
|
||||||
fmt.Scanf("%s", &password)
|
fmt.Fscanf(stdin, "%s", &password)
|
||||||
|
|
||||||
fmt.Fprint(stdout, "Email (", authConfig.Email, "): ")
|
fmt.Fprint(stdout, "Email (", authConfig.Email, "): ")
|
||||||
fmt.Scanf("%s", &email)
|
fmt.Fscanf(stdin, "%s", &email)
|
||||||
if email == "" {
|
if email == "" {
|
||||||
email = authConfig.Email
|
email = authConfig.Email
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue