File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,10 +178,8 @@ We collect anonymous usage data to help improve cagent. To disable:
178178 Vendor : "Docker Inc." ,
179179 Version : version .Version ,
180180 })
181- } else {
182- if err := rootCmd .ExecuteContext (ctx ); err != nil {
183- return processErr (ctx , err , stderr , rootCmd )
184- }
181+ } else if err := rootCmd .ExecuteContext (ctx ); err != nil {
182+ return processErr (ctx , err , stderr , rootCmd )
185183 }
186184
187185 return nil
@@ -212,7 +210,7 @@ func defaultToRun(rootCmd *cobra.Command, args []string) []string {
212210
213211// isSubcommand reports whether name matches a registered subcommand or alias.
214212func isSubcommand (cmd * cobra.Command , name string ) bool {
215- if name == "help" {
213+ if name == "help" || name == "completion" {
216214 return true
217215 }
218216 for _ , sub := range cmd .Commands () {
You can’t perform that action at this time.
0 commit comments