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