diff --git a/cmd/bundle/deploy.go b/cmd/bundle/deploy.go index cd3a2a368c..60426ecad3 100644 --- a/cmd/bundle/deploy.go +++ b/cmd/bundle/deploy.go @@ -13,6 +13,7 @@ func newDeployCommand() *cobra.Command { cmd := &cobra.Command{ Use: "deploy", Short: "Deploy bundle", + Args: cobra.NoArgs, PreRunE: utils.ConfigureBundleWithVariables, } diff --git a/cmd/bundle/destroy.go b/cmd/bundle/destroy.go index 958681f06c..b27161f982 100644 --- a/cmd/bundle/destroy.go +++ b/cmd/bundle/destroy.go @@ -16,9 +16,9 @@ import ( func newDestroyCommand() *cobra.Command { cmd := &cobra.Command{ - Use: "destroy", - Short: "Destroy deployed bundle resources", - + Use: "destroy", + Short: "Destroy deployed bundle resources", + Args: cobra.NoArgs, PreRunE: utils.ConfigureBundleWithVariables, } diff --git a/cmd/bundle/run.go b/cmd/bundle/run.go index 54aa6ae75c..8814bee0b3 100644 --- a/cmd/bundle/run.go +++ b/cmd/bundle/run.go @@ -17,9 +17,8 @@ import ( func newRunCommand() *cobra.Command { cmd := &cobra.Command{ - Use: "run [flags] KEY", - Short: "Run a resource (e.g. a job or a pipeline)", - + Use: "run [flags] KEY", + Short: "Run a resource (e.g. a job or a pipeline)", Args: cobra.MaximumNArgs(1), PreRunE: utils.ConfigureBundleWithVariables, } diff --git a/cmd/bundle/schema.go b/cmd/bundle/schema.go index f516695c7a..eb0c1fc9ea 100644 --- a/cmd/bundle/schema.go +++ b/cmd/bundle/schema.go @@ -13,6 +13,7 @@ func newSchemaCommand() *cobra.Command { cmd := &cobra.Command{ Use: "schema", Short: "Generate JSON Schema for bundle configuration", + Args: cobra.NoArgs, } cmd.RunE = func(cmd *cobra.Command, args []string) error { diff --git a/cmd/bundle/summary.go b/cmd/bundle/summary.go index 44c79f5d77..8b475661fb 100644 --- a/cmd/bundle/summary.go +++ b/cmd/bundle/summary.go @@ -18,9 +18,9 @@ import ( func newSummaryCommand() *cobra.Command { cmd := &cobra.Command{ - Use: "summary", - Short: "Describe the bundle resources and their deployment states", - + Use: "summary", + Short: "Describe the bundle resources and their deployment states", + Args: cobra.NoArgs, PreRunE: utils.ConfigureBundleWithVariables, // This command is currently intended for the Databricks VSCode extension only diff --git a/cmd/bundle/validate.go b/cmd/bundle/validate.go index f235e097b5..9a5bf1e9ac 100644 --- a/cmd/bundle/validate.go +++ b/cmd/bundle/validate.go @@ -12,9 +12,9 @@ import ( func newValidateCommand() *cobra.Command { cmd := &cobra.Command{ - Use: "validate", - Short: "Validate configuration", - + Use: "validate", + Short: "Validate configuration", + Args: cobra.NoArgs, PreRunE: utils.ConfigureBundleWithVariables, }