Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 0578f18

Browse files
committed
Do not ignore error error when generating completion
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent cd5610e commit 0578f18

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

cmd/docker-app/completion.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package main
22

33
import (
4+
"github.com/docker/cli/cli"
45
"github.com/docker/cli/cli/command"
56
"github.com/spf13/cobra"
67
)
@@ -18,8 +19,9 @@ To configure your bash shell to load completions for each session add to your ba
1819
# ~/.bashrc or ~/.profile
1920
. <(docker-app completion)
2021
`,
21-
Run: func(cmd *cobra.Command, args []string) {
22-
rootCmd.GenBashCompletion(dockerCli.Out())
22+
Args: cli.NoArgs,
23+
RunE: func(cmd *cobra.Command, args []string) error {
24+
return rootCmd.GenBashCompletion(dockerCli.Out())
2325
},
2426
}
2527
}

0 commit comments

Comments
 (0)