1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-15 18:57:01 +00:00

fix: don't overwrite with empty cmd/entrypoint (#1076)

Co-authored-by: ChristopherHX <christopher.homberger@web.de>

Signed-off-by: Ryan <me@hackerc.at>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Ryan 2022-03-29 20:00:52 +02:00 committed by GitHub
parent 78987a6f82
commit 410994b2a3
3 changed files with 26 additions and 3 deletions

View file

@ -58,7 +58,12 @@ func (sd *stepDocker) runUsesContainer() common.Executor {
if err != nil {
return err
}
entrypoint := strings.Fields(eval.Interpolate(step.With["entrypoint"]))
var entrypoint []string
if entry := eval.Interpolate(step.With["entrypoint"]); entry != "" {
entrypoint = []string{entry}
}
stepContainer := sd.newStepContainer(ctx, image, cmd, entrypoint)
return common.NewPipelineExecutor(