Trace javascript action exit code instead of user logs (#290)

* Trace javascript action exit code instead of user logs

* Debug instead of trace
This commit is contained in:
David Kale
2020-01-21 11:23:30 -05:00
committed by GitHub
parent fa2ecfcc4c
commit 746c9d9ec0
2 changed files with 2 additions and 2 deletions

View File

@@ -193,9 +193,9 @@ namespace GitHub.Runner.Worker.Handlers
using (var stderrManager = new OutputManager(ExecutionContext, ActionCommandManager, container))
{
var runExitCode = await dockerManger.DockerRun(ExecutionContext, container, stdoutManager.OnDataReceived, stderrManager.OnDataReceived);
ExecutionContext.Debug($"Docker Action run completed with exit code {runExitCode}");
if (runExitCode != 0)
{
ExecutionContext.Error($"Docker run failed with exit code {runExitCode}");
ExecutionContext.Result = TaskResult.Failed;
}
}

View File

@@ -122,9 +122,9 @@ namespace GitHub.Runner.Worker.Handlers
else
{
var exitCode = await step;
ExecutionContext.Debug($"Node Action run completed with exit code {exitCode}");
if (exitCode != 0)
{
ExecutionContext.Error($"Node run failed with exit code {exitCode}");
ExecutionContext.Result = TaskResult.Failed;
}
}