Skip to content

Commit

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

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

0 comments on commit 6c6cf60

Please sign in to comment.