1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Remove unnecessary call to /info

Avoid using the `/info` endpoint in the `login` and `logout` workflows
when the Registry endpoint is overriden by the user through the command
line.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
This commit is contained in:
Arnaud Porterie 2016-02-03 10:30:17 -08:00
parent 7e236e623b
commit 243d0d6bbe
2 changed files with 6 additions and 2 deletions

View file

@ -35,9 +35,11 @@ func (cli *DockerCli) CmdLogin(args ...string) error {
cli.in = os.Stdin
}
serverAddress := cli.electAuthServer()
var serverAddress string
if len(cmd.Args()) > 0 {
serverAddress = cmd.Arg(0)
} else {
serverAddress = cli.electAuthServer()
}
authConfig, err := cli.configureAuth(*flUser, *flPassword, *flEmail, serverAddress)

View file

@ -18,9 +18,11 @@ func (cli *DockerCli) CmdLogout(args ...string) error {
cmd.ParseFlags(args, true)
serverAddress := cli.electAuthServer()
var serverAddress string
if len(cmd.Args()) > 0 {
serverAddress = cmd.Arg(0)
} else {
serverAddress = cli.electAuthServer()
}
if _, ok := cli.configFile.AuthConfigs[serverAddress]; !ok {