()
| 70 | } |
| 71 | |
| 72 | func (sr *stepRun) setupShellCommandExecutor() common.Executor { |
| 73 | return func(ctx context.Context) error { |
| 74 | scriptName, script, err := sr.setupShellCommand(ctx) |
| 75 | if err != nil { |
| 76 | return err |
| 77 | } |
| 78 | |
| 79 | rc := sr.getRunContext() |
| 80 | return rc.JobContainer.Copy(rc.JobContainer.GetActPath(), &container.FileEntry{ |
| 81 | Name: scriptName, |
| 82 | Mode: 0o755, |
| 83 | Body: script, |
| 84 | })(ctx) |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | func getScriptName(rc *RunContext, step *model.Step) string { |
| 89 | scriptName := step.ID |
no test coverage detected