Add email to login command when given
This commit is contained in:
parent
87e0bec62f
commit
cec1cb5d12
13
plugin.go
13
plugin.go
@ -123,6 +123,9 @@ const dockerExe = "/usr/local/bin/docker"
|
||||
|
||||
// helper function to create the docker login command.
|
||||
func commandLogin(login Login) *exec.Cmd {
|
||||
if p.Login.Email != "" {
|
||||
return commandLoginEmail(p.Login)
|
||||
}
|
||||
return exec.Command(
|
||||
dockerExe, "login",
|
||||
"-u", login.Username,
|
||||
@ -131,6 +134,16 @@ func commandLogin(login Login) *exec.Cmd {
|
||||
)
|
||||
}
|
||||
|
||||
func commandLoginEmail(p.Login) *exec.Cmd {
|
||||
return exec.Command(
|
||||
dockerExe, "login",
|
||||
"-u", login.Username,
|
||||
"-p", login.Password,
|
||||
"-e", login.Email,
|
||||
login.Registry,
|
||||
)
|
||||
}
|
||||
|
||||
// helper function to create the docker info command.
|
||||
func commandVersion() *exec.Cmd {
|
||||
return exec.Command(dockerExe, "version")
|
||||
|
Loading…
Reference in New Issue
Block a user