Skip to content

Commit 08a5a4e

Browse files
committed
refactor: prioritize pipeline flag over arg in run-pipeline
1 parent 02a5120 commit 08a5a4e

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

cmd/run_pipeline.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,7 @@ Execute a pipeline
117117
RunE: func(cobraCmd *cobra.Command, args []string) error {
118118
if len(args) == 0 && cmd.Pipeline == "" {
119119
return fmt.Errorf("please specify a pipeline through --pipeline or argument")
120-
} else if len(args) == 1 && cmd.Pipeline != "" {
121-
return fmt.Errorf("please specify a pipeline either through --pipeline or argument")
122-
} else if len(args) == 1 {
120+
} else if len(args) == 1 && cmd.Pipeline == "" {
123121
cmd.Pipeline = args[0]
124122
}
125123

0 commit comments

Comments
 (0)