From fcaea8c75312cd624e0b514e860e7927affb771f Mon Sep 17 00:00:00 2001 From: Marc Cataford Date: Fri, 2 Aug 2024 17:38:00 -0400 Subject: [PATCH] feat: enforce exact number of positionals instead of a minimum --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index aa428cb..25b14a4 100644 --- a/main.go +++ b/main.go @@ -33,7 +33,7 @@ var cli = &cobra.Command{ var execute = &cobra.Command{ Use: "execute [workflow-file]", Short: "Executes the provided workflow.", - Args: cobra.MinimumNArgs(1), + Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { config := cmd.Context().Value("config").(*commands.Configuration) @@ -47,7 +47,7 @@ var execute = &cobra.Command{ var validate = &cobra.Command{ Use: "validate [workflow-file]", Short: "Validates the structure of the provided workflow.", - Args: cobra.MinimumNArgs(1), + Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { config := cmd.Context().Value("config").(*commands.Configuration)