From cda02dc13a2e06c5b986a8db3fdd572133544268 Mon Sep 17 00:00:00 2001 From: cgoodwin90 Date: Fri, 17 Nov 2023 17:59:26 +1100 Subject: [PATCH] Updated addDeployTargetConfigCmd to check project & deploytarget provided --- cmd/deploytargetconfig.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/deploytargetconfig.go b/cmd/deploytargetconfig.go index d4f20b28..ad0dfcf8 100644 --- a/cmd/deploytargetconfig.go +++ b/cmd/deploytargetconfig.go @@ -44,6 +44,12 @@ var addDeployTargetConfigCmd = &cobra.Command{ return err } + if cmdProjectName == "" { + return fmt.Errorf("Missing arguments: project is a required flag") + } + if deploytarget == 0 { + return fmt.Errorf("Missing arguments: deploytarget id is a required flag") + } if pullrequests == "" { return fmt.Errorf("Missing arguments: pullrequests is a required flag") }