Properly set creds for DOCKER_USER for klar

This commit is contained in:
Jacob McCann 2017-01-14 22:23:48 -06:00
parent ed4ab7a5cf
commit ad766396b9

View File

@ -20,12 +20,12 @@ type (
func (p Plugin) Exec() error {
os.Setenv("CLAIR_ADDR", p.Url)
_, exist := os.LookupEnv("DOCKER_USERNAME")
if ! exist {
os.Setenv("DOCKER_USERNAME", p.Username)
_, exist := os.LookupEnv("DOCKER_USER")
if !exist {
os.Setenv("DOCKER_USER", p.Username)
}
_, exist = os.LookupEnv("DOCKER_PASSWORD")
if ! exist {
if !exist {
os.Setenv("DOCKER_PASSWORD", p.Password)
}