Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
Injection errors now handled.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien Herfray committed Oct 20, 2015
1 parent eadc5c1 commit 8c433fb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions zest.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ func (z *Zest) SetCli(cli cli.App) {
}

// Run starts the Cli app.
func (z *Zest) Run() {
z.cli.Run(os.Args)
func (z *Zest) Run() error {
return z.cli.Run(os.Args)
}

// Classic returns a new instance of Zest, with some default register and init steps:
Expand Down Expand Up @@ -115,7 +115,9 @@ func (z *Zest) init(c *cli.Context) error {
}
}

z.Injector.Inject()
if err := z.Injector.Inject(); err != nil {
return err
}

for _, f := range z.InitSequence {
if err := f(z); err != nil {
Expand Down

0 comments on commit 8c433fb

Please sign in to comment.