Skip to content

Commit

Permalink
Merge pull request #24 from stuartleeks/sl/suppress-update-on-completion
Browse files Browse the repository at this point in the history
Suppress main PersistentPreRun on completion cmd
  • Loading branch information
stuartleeks committed Jul 26, 2020
2 parents 8534e00 + 09f33e4 commit 81c8aa5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/devcontainer/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ func createCompleteCommand(rootCmd *cobra.Command) *cobra.Command {
source <(devcontainer completion bash | sed s/devcontainer/dc/g)
`,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
// suppress the PersistentPreRun in main
},
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) != 1 {
_ = cmd.Usage()
Expand Down

0 comments on commit 81c8aa5

Please sign in to comment.