From 58bf870825bb2f30a9babcfa8a2f9a0d1ee84954 Mon Sep 17 00:00:00 2001 From: iseki Date: Tue, 26 Nov 2024 16:16:22 +0800 Subject: [PATCH] fix: webhook parsing --- cmd/murphy/internal/common/webhook_mode.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/murphy/internal/common/webhook_mode.go b/cmd/murphy/internal/common/webhook_mode.go index 268410c..c85e693 100644 --- a/cmd/murphy/internal/common/webhook_mode.go +++ b/cmd/murphy/internal/common/webhook_mode.go @@ -28,8 +28,10 @@ func (w *WebhookModeFlag) Set(s string) error { w.simple = true } else if s == "" || s == "full" { w.simple = false + } else { + return fmt.Errorf("invalid webhook mode: %s", strconv.Quote(s)) } - return fmt.Errorf("invalid webhook mode: %s", strconv.Quote(s)) + return nil } func (w *WebhookModeFlag) Type() string {