diff options
author | Qi Wang <qiwan@redhat.com> | 2019-02-14 16:59:16 -0500 |
---|---|---|
committer | Qi Wang <qiwan@redhat.com> | 2019-02-14 17:00:24 -0500 |
commit | c90d3177ad078ccdc3c71514ee53cabfbf390a95 (patch) | |
tree | 36f9884d332f71f6c64c98599e6862dd0f6fef95 | |
parent | ae8cc41295c4ff6f6f82372221c66c250691e4f6 (diff) | |
download | podman-c90d3177ad078ccdc3c71514ee53cabfbf390a95.tar.gz podman-c90d3177ad078ccdc3c71514ee53cabfbf390a95.tar.bz2 podman-c90d3177ad078ccdc3c71514ee53cabfbf390a95.zip |
Fix `podman login` lying problem
Signed-off-by: Qi Wang <qiwan@redhat.com>
-rw-r--r-- | cmd/podman/login.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/login.go b/cmd/podman/login.go index 1fc4d5327..0ae1ed7d0 100644 --- a/cmd/podman/login.go +++ b/cmd/podman/login.go @@ -110,7 +110,7 @@ func loginCmd(c *cliconfig.LoginValues) error { } // If no username and no password is specified, try to use existing ones. - if c.Username == "" && password == "" { + if c.Username == "" && password == "" && userFromAuthFile != "" && passFromAuthFile != "" { fmt.Println("Authenticating with existing credentials...") if err := docker.CheckAuth(ctx, sc, userFromAuthFile, passFromAuthFile, server); err == nil { fmt.Println("Existing credentials are valid. Already logged in to", server) |