diff options
-rw-r--r-- | cmd/podman/login.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/podman/login.go b/cmd/podman/login.go index f57f34532..a3eb60ea4 100644 --- a/cmd/podman/login.go +++ b/cmd/podman/login.go @@ -67,7 +67,10 @@ func loginCmd(c *cli.Context) error { sc := common.GetSystemContext("", c.String("authfile"), false) // username of user logged in to server (if one exists) - userFromAuthFile := config.GetUserLoggedIn(sc, server) + userFromAuthFile, err := config.GetUserLoggedIn(sc, server) + if err != nil { + return errors.Wrapf(err, "error getting logged-in user") + } username, password, err := getUserAndPass(c.String("username"), c.String("password"), userFromAuthFile) if err != nil { return errors.Wrapf(err, "error getting username and password") |