clear expressions first

This commit is contained in:
Francesco Renzi
2026-01-16 01:31:26 +00:00
committed by GitHub
parent 39808903ea
commit 842b3e64b0
2 changed files with 157 additions and 0 deletions

View File

@@ -86,6 +86,8 @@ namespace GitHub.Runner.Worker
step.ExecutionContext.Start();
// Expression functions
// Clear first to handle step-back scenarios where the same step may be re-processed
step.ExecutionContext.ExpressionFunctions.Clear();
step.ExecutionContext.ExpressionFunctions.Add(new FunctionInfo<AlwaysFunction>(PipelineTemplateConstants.Always, 0, 0));
step.ExecutionContext.ExpressionFunctions.Add(new FunctionInfo<CancelledFunction>(PipelineTemplateConstants.Cancelled, 0, 0));
step.ExecutionContext.ExpressionFunctions.Add(new FunctionInfo<FailureFunction>(PipelineTemplateConstants.Failure, 0, 0));