Skip to content

Commit

Permalink
fix: fix to return an error if the trigger does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
rhumie committed Feb 27, 2024
1 parent 09807d2 commit e8fae4c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ func initRootOption(cmd *cobra.Command) (*RootOption, error) {

// rootRun executes a main process of the root command.
func rootRun(ctx context.Context, opt *RootOption) error {
if len(opt.Triggers) == 0 {
return errors.New("at least one trigger must be defined")
}
db, err := dynasc.NewDBClient(ctx, opt.DynamoEndpoint)
if err != nil {
return errors.Wrap(err, "failed to create a client of DynamoDB")
Expand Down

0 comments on commit e8fae4c

Please sign in to comment.