Skip to content

Commit 09f33e4

Browse files
committed
Suppress main PersistentPreRun on completion cmd
1 parent 8534e00 commit 09f33e4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/devcontainer/completion.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ func createCompleteCommand(rootCmd *cobra.Command) *cobra.Command {
2828
source <(devcontainer completion bash | sed s/devcontainer/dc/g)
2929
3030
`,
31+
PersistentPreRun: func(cmd *cobra.Command, args []string) {
32+
// suppress the PersistentPreRun in main
33+
},
3134
RunE: func(cmd *cobra.Command, args []string) error {
3235
if len(args) != 1 {
3336
_ = cmd.Usage()

0 commit comments

Comments
 (0)