Do not ignore error error when generating completion
package main
import (
+ "github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/spf13/cobra"
)
@@ -18,8 +19,9 @@ To configure your bash shell to load completions for each session add to your ba
# ~/.bashrc or ~/.profile
. <(docker-app completion)
`,
- Run: func(cmd *cobra.Command, args []string) {
- rootCmd.GenBashCompletion(dockerCli.Out())
+ Args: cli.NoArgs,
+ RunE: func(cmd *cobra.Command, args []string) error {
+ return rootCmd.GenBashCompletion(dockerCli.Out())
},
}
}
