diff --git a/cmd/build.go b/cmd/build.go index 62e2397..012ab5f 100644 --- a/cmd/build.go +++ b/cmd/build.go @@ -15,7 +15,7 @@ func NewBuildCommand() *cobra.Command { var buildCmd = &cobra.Command{ Use: "build ", Short: "Builds stored Kusto functions and tables into command scripts suitable for deployment.", - Args: cobra.MaximumNArgs(1), + Args: cobra.ExactArgs(1), Long: heredoc.Doc(` Build transpiles all Kusto declarative file declarations under the current directory, into command scripts under the 'kout' directory relative to the current directory. diff --git a/cmd/run.go b/cmd/run.go index 43334d6..6c30ade 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -17,7 +17,7 @@ func NewRunCmd() *cobra.Command { var runCmd = &cobra.Command{ Use: "run ", Short: "Runs a script file.", - Args: cobra.MaximumNArgs(1), + Args: cobra.ExactArgs(1), Long: heredoc.Doc(` Run executes the script file against a Kusto database. `), diff --git a/cmd/sync.go b/cmd/sync.go index 416243b..6dac9e4 100644 --- a/cmd/sync.go +++ b/cmd/sync.go @@ -23,7 +23,7 @@ func NewSyncCommand() *cobra.Command { var syncCmd = &cobra.Command{ Use: "sync ", Short: "Syncs Kusto function and table declarations to a targeted Azure Data Explorer database", - Args: cobra.MaximumNArgs(1), + Args: cobra.ExactArgs(1), Long: heredoc.Doc(` sync will automatically call 'ksd build' to ensure that all files are built into command scripts. To skip this behavior, pass the '--from-out' flag specifying the output directory that is already built.