Ensure we fail during deploys

If an error gets emitted during a deployment, we should fail.
This also reenables colors that seems to have gotten lost somewhere.
This commit is contained in:
joeduffy 2017-09-09 12:42:04 -07:00
parent f75b465052
commit f74e9e04bd
2 changed files with 6 additions and 2 deletions

View file

@ -108,7 +108,9 @@ func (eng *Engine) deployLatest(info *envCmdInfo, opts deployOptions) error {
_ = eng.Environment.SaveEnvironment(targ, summary.Snap())
fmt.Fprint(eng.Stdout, colors.Colorize(&footer))
return err
if err != nil {
return err
}
}
}
if !eng.Diag().Success() {

View file

@ -21,7 +21,9 @@ type Engine struct {
func (e *Engine) Diag() diag.Sink {
if e.snk == nil {
e.InitDiag(diag.FormatOptions{})
e.InitDiag(diag.FormatOptions{
Colors: true,
})
}
return e.snk