Skip to content

Commit

Permalink
fix: skip vault client for help and version commands
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasgl-orange authored and FalcoSuessgott committed Jun 22, 2024
1 parent f84df7c commit 17ede9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ func NewRootCmd() *cobra.Command {
SilenceUsage: true,
SilenceErrors: true,
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
// skip vault client creation for completion, docs and manpage generation
if (cmd.HasParent() && cmd.Parent().Use == "completion") || cmd.Use == "docs" || cmd.Use == "man" {
// skip vault client creation for completion, version, help, docs and manpage generation
if (cmd.HasParent() && cmd.Parent().Use == "completion") || cmd.Use == "docs" || cmd.Use == "help" || cmd.Use == "version" || cmd.Use == "man" {
return nil
}

Expand Down

0 comments on commit 17ede9d

Please sign in to comment.