From 3c461ba65bc8950cfcc47cb1689960ac293d2073 Mon Sep 17 00:00:00 2001 From: Aishwarya Lad <67022814+Aishwarya-Lad@users.noreply.github.com> Date: Mon, 22 Jul 2024 16:27:35 -0700 Subject: [PATCH] fix:[CI-13562]: add error in command login too --- docker.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docker.go b/docker.go index 59511da..3884223 100644 --- a/docker.go +++ b/docker.go @@ -177,7 +177,12 @@ func (p Plugin) Exec() error { baseConnectorLogin.Password = p.BaseImagePassword cmd := commandLogin(baseConnectorLogin) - + if p.BaseImageUsername == "" { + 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.") + } + if p.BaseImagePassword == "" { + 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.") + } raw, err := cmd.CombinedOutput() if err != nil { out := string(raw)