From 8ff1f288d9386fbaf2bce7703ab74cfb8f2608b4 Mon Sep 17 00:00:00 2001 From: Ankitsinghsisodya Date: Sun, 24 May 2026 17:22:55 +0530 Subject: [PATCH] refactor(invoke): remove redundant extension flag validation for cloudevent format The check for the extension flag being valid only with the cloudevent format has been simplified by removing the redundant validation. This streamlines the code and clarifies the intended usage of the extension flag. --- cmd/invoke.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/cmd/invoke.go b/cmd/invoke.go index 9ff96d37fa..c6b00adaec 100644 --- a/cmd/invoke.go +++ b/cmd/invoke.go @@ -175,9 +175,6 @@ func runInvoke(cmd *cobra.Command, _ []string, newClient ClientFactory) (err err if effectiveFormat != "cloudevent" { return fmt.Errorf("--extension (-e) is only valid with cloudevents") } - if effectiveFormat != "" && effectiveFormat != "cloudevent" { - return fmt.Errorf("--extension flag is only valid with cloudevent format") - } } // Client instance from env vars, flags, args and user prompts (if --confirm)