diff options
Diffstat (limited to 'cmd/podman/login.go')
-rw-r--r-- | cmd/podman/login.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/podman/login.go b/cmd/podman/login.go index 8625828de..76f0f50ff 100644 --- a/cmd/podman/login.go +++ b/cmd/podman/login.go @@ -27,7 +27,7 @@ var ( }, cli.StringFlag{ Name: "authfile", - Usage: "Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json", + Usage: "Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json. Use REGISTRY_AUTH_FILE environment variable to override. ", }, cli.StringFlag{ Name: "cert-dir", @@ -64,8 +64,9 @@ func loginCmd(c *cli.Context) error { if len(args) == 1 { server = args[0] } + authfile := getAuthFile(c.String("authfile")) - sc := common.GetSystemContext("", c.String("authfile"), false) + sc := common.GetSystemContext("", authfile, false) // username of user logged in to server (if one exists) userFromAuthFile, err := config.GetUserLoggedIn(sc, server) |