Skip to content

Commit 71e39b8

Browse files
authored
Merge branch 'main' into fix/git-repository-error-handling
2 parents 22cc25a + 8d544cd commit 71e39b8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

commands/root.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ var root = &cobra.Command{
3737
Long: "A full-featured license guard to check and fix license headers and dependencies' licenses",
3838
SilenceUsage: true,
3939
SilenceErrors: true,
40-
PersistentPreRunE: func(_ *cobra.Command, _ []string) error {
40+
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
41+
if cmd.Name() == "__complete" || (cmd.Parent() != nil && cmd.Parent().Name() == "completion") {
42+
return nil
43+
}
4144
level, err := logrus.ParseLevel(verbosity)
4245
if err != nil {
4346
return err

0 commit comments

Comments
 (0)