Skip to content

Commit

Permalink
Remove Runnable payload from events since they're not currently working.
Browse files Browse the repository at this point in the history
  • Loading branch information
metacosm committed Jan 27, 2019
1 parent c60cf81 commit 955407b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/odo/genericclioptions/runnable.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ type Runnable interface {
}

func GenericRun(o Runnable, cmd *cobra.Command, args []string) {
// gob.Register(o) // TODO: figure out how to properly serialize Runnable so that it can be passed as event payload
exitIfAbort(events.DispatchEvent(cmd, api.PreRun, args), cmd)
util.LogErrorAndExit(o.Complete(cmd.Name(), cmd, args), "")
exitIfAbort(events.DispatchEvent(cmd, api.PostComplete, o), cmd)
exitIfAbort(events.DispatchEvent(cmd, api.PostComplete, nil), cmd)
util.LogErrorAndExit(o.Validate(), "")
exitIfAbort(events.DispatchEvent(cmd, api.PostValidate, o), cmd)
exitIfAbort(events.DispatchEvent(cmd, api.PostValidate, nil), cmd)
util.LogErrorAndExit(o.Run(), "")
exitIfAbort(events.DispatchEvent(cmd, api.PostRun, o), cmd)
exitIfAbort(events.DispatchEvent(cmd, api.PostRun, nil), cmd)
}

func exitIfAbort(err error, cmd *cobra.Command) {
Expand Down

0 comments on commit 955407b

Please sign in to comment.