mirror of
https://github.com/containers/podman.git
synced 2025-12-05 12:52:12 +08:00
Merge pull request #3168 from rhatdan/vendor
Update vendor of buildah and containers/images
This commit is contained in:
@@ -74,21 +74,6 @@ func loginCmd(c *cliconfig.LoginValues) error {
|
||||
sc.DockerCertPath = c.CertDir
|
||||
}
|
||||
|
||||
if c.Flag("get-login").Changed {
|
||||
user, err := config.GetUserLoggedIn(sc, server)
|
||||
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "unable to check for login user")
|
||||
}
|
||||
|
||||
if user == "" {
|
||||
return errors.Errorf("not logged into %s", server)
|
||||
}
|
||||
|
||||
fmt.Printf("%s\n", user)
|
||||
return nil
|
||||
}
|
||||
|
||||
// username of user logged in to server (if one exists)
|
||||
userFromAuthFile, passFromAuthFile, err := config.GetAuthentication(sc, server)
|
||||
// Do not return error if no credentials found in credHelpers, new credentials will be stored by config.SetAuthentication
|
||||
@@ -96,6 +81,14 @@ func loginCmd(c *cliconfig.LoginValues) error {
|
||||
return errors.Wrapf(err, "error reading auth file")
|
||||
}
|
||||
|
||||
if c.Flag("get-login").Changed {
|
||||
if userFromAuthFile == "" {
|
||||
return errors.Errorf("not logged into %s", server)
|
||||
}
|
||||
fmt.Printf("%s\n", userFromAuthFile)
|
||||
return nil
|
||||
}
|
||||
|
||||
ctx := getContext()
|
||||
|
||||
password := c.Password
|
||||
|
||||
Reference in New Issue
Block a user