From 06292aa118e91df078cc3dbda48de8a13c3ab93b Mon Sep 17 00:00:00 2001 From: Tingluo Huang Date: Fri, 3 Jan 2020 21:23:46 -0500 Subject: [PATCH] Expose whether debug is on/off via RUNNER_DEBUG. (#253) --- src/Runner.Worker/JobRunner.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Runner.Worker/JobRunner.cs b/src/Runner.Worker/JobRunner.cs index 3998232bb..585885ffe 100644 --- a/src/Runner.Worker/JobRunner.cs +++ b/src/Runner.Worker/JobRunner.cs @@ -107,6 +107,11 @@ namespace GitHub.Runner.Worker return await CompleteJobAsync(jobServer, jobContext, message, TaskResult.Failed); } + if (jobContext.WriteDebug) + { + jobContext.SetRunnerContext("debug", "1"); + } + jobContext.SetRunnerContext("os", VarUtil.OS); string toolsDirectory = HostContext.GetDirectory(WellKnownDirectory.Tools);