From 57d59fcd6eb8e66948b3ead44da013ec36ebaa90 Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Thu, 25 Jun 2020 13:53:41 -0400 Subject: [PATCH] Fix Workflow Step Env overiding Parent Env --- src/Runner.Worker/Handlers/CompositeActionHandler.cs | 2 +- .../Pipelines/ObjectTemplating/PipelineTemplateEvaluator.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Runner.Worker/Handlers/CompositeActionHandler.cs b/src/Runner.Worker/Handlers/CompositeActionHandler.cs index 6fb543b79..d626fde4f 100644 --- a/src/Runner.Worker/Handlers/CompositeActionHandler.cs +++ b/src/Runner.Worker/Handlers/CompositeActionHandler.cs @@ -58,7 +58,7 @@ namespace GitHub.Runner.Worker.Handlers var envData = new Dictionary(); // Copy over parent environment - foreach (var env in ExecutionContext.EnvironmentVariables) + foreach (var env in Environment) { envData[env.Key] = env.Value; } diff --git a/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/PipelineTemplateEvaluator.cs b/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/PipelineTemplateEvaluator.cs index 55076e670..f09a905bb 100644 --- a/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/PipelineTemplateEvaluator.cs +++ b/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/PipelineTemplateEvaluator.cs @@ -160,8 +160,7 @@ namespace GitHub.DistributedTask.Pipelines.ObjectTemplating } public List LoadCompositeSteps( - TemplateToken token - ) + TemplateToken token) { var result = default(List); if (token != null && token.Type != TokenType.Null)