From bfa3314ad3dbfa2a78caf63181f4a4e80f2e4028 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sun, 29 Mar 2026 22:41:25 +0100 Subject: [PATCH] also skip for help (if called as command and not flag) --- cmd/root.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index b0a481a..f65d2e2 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -28,7 +28,7 @@ It allows you to add, list, and delete patterns from the exclude file easily. This tool is particularly useful for developers who want to keep their repository clean by excluding certain files or directories from version control.`, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { - if cmd.Name() == "completion" { + if cmd.Name() == "completion" || cmd.Name() == "help" { return nil } @@ -46,7 +46,7 @@ by excluding certain files or directories from version control.`, return nil }, PersistentPostRunE: func(cmd *cobra.Command, args []string) error { - if cmd.Name() == "completion" { + if cmd.Name() == "completion" || cmd.Name() == "help" { return nil }