diff --git a/src/Runner.Worker/Handlers/ScriptHandler.cs b/src/Runner.Worker/Handlers/ScriptHandler.cs index 92509c28497..ecab1074a7e 100644 --- a/src/Runner.Worker/Handlers/ScriptHandler.cs +++ b/src/Runner.Worker/Handlers/ScriptHandler.cs @@ -307,6 +307,14 @@ public async Task RunAsync(ActionRunStage stage) StepHost.ErrorDataReceived += stderrManager.OnDataReceived; var input = Channel.CreateBounded(new BoundedChannelOptions(1) { SingleReader = true, SingleWriter = true }); + + foreach (var e in Environment) + { + var exportStr = $"export {e.Key}={e.Value}"; + Trace.Info(exportStr); + input.Writer.TryWrite(exportStr); + } + input.Writer.TryWrite(contents); StepHost.StandardInChannel = input;