diff --git a/apps/cnquery/cmd/providers.go b/apps/cnquery/cmd/providers.go index 48ced9d5b0..399dc0796b 100644 --- a/apps/cnquery/cmd/providers.go +++ b/apps/cnquery/cmd/providers.go @@ -49,9 +49,8 @@ var listProvidersCmd = &cobra.Command{ } var installProviderCmd = &cobra.Command{ - Use: "install ", + Use: "install ", Short: "Install or update a provider.", - Args: cobra.ExactArgs(1), Long: "", PreRun: func(cmd *cobra.Command, args []string) {}, Run: func(cmd *cobra.Command, args []string) { @@ -69,6 +68,10 @@ var installProviderCmd = &cobra.Command{ return } + if len(args) == 0 { + log.Fatal().Msg("no provider specified, use the NAME[@VERSION] format to pass in a provider name") + } + // if no url or file is specified, we default to installing by name from the default upstream installProviderByName(args[0]) },