call cmd.Run
This commit is contained in:
@@ -99,7 +99,7 @@ func (s *service) Init(opts ...Option) {
|
||||
s.opts.Cmd.App().Name = s.Server().Options().Name
|
||||
}
|
||||
|
||||
// Initialise the command flags, overriding new service
|
||||
// Initialise the command options
|
||||
if err := s.opts.Cmd.Init(
|
||||
cmd.Auth(&s.opts.Auth),
|
||||
cmd.Broker(&s.opts.Broker),
|
||||
@@ -115,6 +115,12 @@ func (s *service) Init(opts ...Option) {
|
||||
logger.Fatal(err)
|
||||
}
|
||||
|
||||
// execute the command
|
||||
// TODO: do this in service.Run()
|
||||
if err := s.opts.Cmd.Run(); err != nil {
|
||||
logger.Fatal(err)
|
||||
}
|
||||
|
||||
// Explicitly set the table name to the service name
|
||||
name := s.opts.Cmd.App().Name
|
||||
s.opts.Store.Init(store.Table(name))
|
||||
|
||||
Reference in New Issue
Block a user