From c58025b39b01611d213f2a687d3524c733452f7b Mon Sep 17 00:00:00 2001 From: Grzegorz Bernady Date: Fri, 16 Feb 2024 13:26:58 +0100 Subject: [PATCH] Hotfix calling commands not requiring auth --- internal/core/root.go | 5 +++++ 1 file changed, 5 insertions(+) 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",