diff --git a/internal/core/root.go b/internal/core/root.go index 9300262..2409a9f 100644 --- a/internal/core/root.go +++ b/internal/core/root.go @@ -47,6 +47,11 @@ func Execute() { } rootCmd.PersistentPreRunE = func(cmd *cobra.Command, args []string) error { + for _, safeCmd := range []string{"completion", "help"} { + if strings.Contains(cmd.CommandPath(), safeCmd) { + return nil + } + } if *apiUrl == "" { return &errors.CliError{ Message: "URL for API isn't specified",