1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-08-06 17:40:58 +00:00

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 80082bf688
commit e2bd3da707
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)
}
}