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:
parent
f75b465052
commit
f74e9e04bd
|
@ -108,9 +108,11 @@ func (eng *Engine) deployLatest(info *envCmdInfo, opts deployOptions) error {
|
|||
_ = eng.Environment.SaveEnvironment(targ, summary.Snap())
|
||||
|
||||
fmt.Fprint(eng.Stdout, colors.Colorize(&footer))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
if !eng.Diag().Success() {
|
||||
// If any error that wasn't printed above, be sure to make it evident in the output.
|
||||
return goerr.New("One or more errors occurred during this deployment")
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue