Skip to content

Commit 3c461ba

Browse files
committed
fix:[CI-13562]: add error in command login too
1 parent e1e1a6c commit 3c461ba

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docker.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,12 @@ func (p Plugin) Exec() error {
177177
baseConnectorLogin.Password = p.BaseImagePassword
178178

179179
cmd := commandLogin(baseConnectorLogin)
180-
180+
if p.BaseImageUsername == "" {
181+
return fmt.Errorf("Username cannot be empty. The base image connector requires authenticated access. Please either use an authenticated connector, or remove the base image connector.")
182+
}
183+
if p.BaseImagePassword == "" {
184+
return fmt.Errorf("Password cannot be empty. The base image connector requires authenticated access. Please either use an authenticated connector, or remove the base image connector.")
185+
}
181186
raw, err := cmd.CombinedOutput()
182187
if err != nil {
183188
out := string(raw)

0 commit comments

Comments
 (0)