Skip to content

Commit

Permalink
fix: check for empty name and selector
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Sukhin <[email protected]>
  • Loading branch information
vsukhin committed Nov 14, 2024
1 parent e69a2f9 commit e907ab8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/tcl/testworkflow-toolkit/commands/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,10 @@ func NewExecuteCmd() *cobra.Command {
ui.Fail(errors.Wrap(err, "unmarshal workflow definition"))
}

if w.Name == "" && w.Selector == nil {
ui.Fail(errors.New("either workflow name or selector should be specified"))
}

var testWorkflowNames []string
if w.Name != "" {
testWorkflowNames = []string{w.Name}
Expand Down

0 comments on commit e907ab8

Please sign in to comment.