Fix: regression run after failure (#971)

* Fix: Regressions of run step after failure

* Add test, to enshure no panic

* Print error of failed step
This commit is contained in:
ChristopherHX
2022-01-27 17:20:44 +01:00
committed by GitHub
parent 557dc755b8
commit 7dbf3fcb96
4 changed files with 37 additions and 6 deletions

View File

@@ -136,12 +136,13 @@ func (e Executor) Then(then Executor) Executor {
case Warning:
log.Warning(err.Error())
default:
SetJobError(ctx, err)
log.Debugf("%+v", err)
return err
}
} else if ctx.Err() != nil {
SetJobError(ctx, ctx.Err())
}
if ctx.Err() != nil {
return ctx.Err()
}
return then(ctx)
}
}