Merge pull request #11258 from HuKeping/cmdlogin

Remove leading spaces of username when login
This commit is contained in:
Tibor Vass 2015-03-09 19:02:24 -04:00
commit aa19a78d3d
1 changed files with 1 additions and 0 deletions

View File

@ -344,6 +344,7 @@ func (cli *DockerCli) CmdLogin(args ...string) error {
if username == "" {
promptDefault("Username", authconfig.Username)
username = readInput(cli.in, cli.out)
username = strings.Trim(username, " ")
if username == "" {
username = authconfig.Username
}