Skip to content

Commit

Permalink
Export exposed env vars #2
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamOlech committed Jul 27, 2021
1 parent 6c6cf60 commit 7b65f88
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Runner.Worker/Handlers/ScriptHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,16 @@ public async Task RunAsync(ActionRunStage stage)
StepHost.ErrorDataReceived += stderrManager.OnDataReceived;

var input = Channel.CreateBounded<string>(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;

Expand Down

0 comments on commit 7b65f88

Please sign in to comment.