Don't interpolate joboutputs, before job is done (#894)

* Don't interpolate joboutputs, before job is donei

All credits go to @ChristopherHX which fixed this issue.
I only created a PR for this so it will be fixed in the upstream binary.

This fixes #758

* Added output test

* Fix typo
This commit is contained in:
Mathijs van Veluw
2021-11-24 16:49:08 +01:00
committed by GitHub
parent 96cf907c5e
commit ff8b1df797
4 changed files with 60 additions and 15 deletions

View File

@@ -39,19 +39,6 @@ func (sc *StepContext) execJobContainer() common.Executor {
}
}
func (sc *StepContext) interpolateOutputs() common.Executor {
return func(ctx context.Context) error {
ee := sc.NewExpressionEvaluator()
for k, v := range sc.RunContext.Run.Job().Outputs {
interpolated := ee.Interpolate(v)
if v != interpolated {
sc.RunContext.Run.Job().Outputs[k] = interpolated
}
}
return nil
}
}
type formatError string
func (e formatError) Error() string {