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 Dec 28, 2020
1 parent 55a4738 commit 989fe4c
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 989fe4c

Please sign in to comment.