We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd4dcf2 commit 42b410fCopy full SHA for 42b410f
1 file changed
cmd/events.go
@@ -58,9 +58,6 @@ func eventsSendRunE(cmd *cobra.Command, args []string) error {
58
59
email, _ := cmd.Flags().GetString("email")
60
userID, _ := cmd.Flags().GetString("user-id")
61
- if email == "" && userID == "" {
62
- return fmt.Errorf("at least one of --email or --user-id is required")
63
- }
64
65
eventName := args[0]
66
idempotencyKey, _ := cmd.Flags().GetString("idempotency-key")
@@ -123,6 +120,7 @@ func addEventsSendFlags(cmd *cobra.Command) {
123
120
124
121
func init() {
125
122
addEventsSendFlags(eventsSendCmd)
+ eventsSendCmd.MarkFlagsOneRequired("email", "user-id")
126
eventsCmd.AddCommand(eventsSendCmd)
127
rootCmd.AddCommand(eventsCmd)
128
}
0 commit comments