Skip to content

Commit 94aa16b

Browse files
authored
Only in debug
1 parent e2f4c6c commit 94aa16b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Runner.Listener/Runner.cs

+2
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ private async Task<int> RunAsync(RunnerSettings settings, bool runOnce = false)
408408
{
409409
autoUpdateInProgress = true;
410410
var runnerUpdateMessage = JsonUtility.FromString<AgentRefreshMessage>(message.Body);
411+
#if DEBUG
411412
// Can mock the update for testing
412413
if (StringUtil.ConvertToBoolean(Environment.GetEnvironmentVariable("GITHUB_ACTIONS_RUNNER_IS_MOCK_UPDATE")))
413414
{
@@ -427,6 +428,7 @@ private async Task<int> RunAsync(RunnerSettings settings, bool runOnce = false)
427428
}
428429
}
429430
}
431+
#endif
430432
var selfUpdater = HostContext.GetService<ISelfUpdater>();
431433
selfUpdateTask = selfUpdater.SelfUpdate(runnerUpdateMessage, jobDispatcher, false, HostContext.RunnerShutdownToken);
432434
Trace.Info("Refresh message received, kick-off selfupdate background process.");

0 commit comments

Comments
 (0)