From 448660f09de00a4b9c73a5d6ff3938a4d30bdcd8 Mon Sep 17 00:00:00 2001 From: Wei Lim Date: Fri, 10 Nov 2023 09:54:42 -0800 Subject: [PATCH] use exact args --- cmd/build.go | 2 +- cmd/run.go | 2 +- cmd/sync.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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.