From 82ade6b5aa3e5c8fbe3f008e9cf64cbce9dab744 Mon Sep 17 00:00:00 2001 From: Dmitrij Fedorenko Date: Tue, 26 Nov 2019 08:33:10 +0300 Subject: [PATCH] Allow anonymous access to registry --- plugin.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.go b/plugin.go index f2f1198..edd055d 100644 --- a/plugin.go +++ b/plugin.go @@ -74,13 +74,13 @@ func mainfestToolPath() string { func (p *Plugin) Exec() error { args := []string{} - if p.Config.Username == "" { + if p.Config.Username == "" && p.Config.Password != "" { return errors.New("you must provide a username") } else { args = append(args, fmt.Sprintf("--username=%s", p.Config.Username)) } - if p.Config.Password == "" { + if p.Config.Password == "" && p.Config.Username != "" { return errors.New("you must provide a password") } else { args = append(args, fmt.Sprintf("--password=%s", p.Config.Password))