Skip to content

Commit edfb51a

Browse files
authored
Better comments
1 parent 94aa16b commit edfb51a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Runner.Listener/Runner.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,8 @@ private async Task<int> RunAsync(RunnerSettings settings, bool runOnce = false)
413413
if (StringUtil.ConvertToBoolean(Environment.GetEnvironmentVariable("GITHUB_ACTIONS_RUNNER_IS_MOCK_UPDATE")))
414414
{
415415

416-
// the mock_update_messages.json file should be of format { "2.283.2": {"targetVersion":"2.284.1"}, "2.284.1": {"targetVersion":"2.285.0"}}
416+
// The mock_update_messages.json file should be an object with keys being the current version and values being the targeted mock version object
417+
// Example: { "2.283.2": {"targetVersion":"2.284.1"}, "2.284.1": {"targetVersion":"2.285.0"}}
417418
var mockUpdatesPath = Path.Combine(HostContext.GetDirectory(WellKnownDirectory.Root), "mock_update_messages.json");
418419
if (File.Exists(mockUpdatesPath))
419420
{
@@ -422,9 +423,8 @@ private async Task<int> RunAsync(RunnerSettings settings, bool runOnce = false)
422423
{
423424
var mockTargetVersion = mockUpdateMessages[BuildConstants.RunnerPackage.Version].TargetVersion;
424425
_term.WriteLine($"Mocking update, using version {mockTargetVersion} instead of {runnerUpdateMessage.TargetVersion}");
426+
Trace.Info($"Mocking update, using version {mockTargetVersion} instead of {runnerUpdateMessage.TargetVersion}");
425427
runnerUpdateMessage = new AgentRefreshMessage(runnerUpdateMessage.AgentId, mockTargetVersion, runnerUpdateMessage.Timeout);
426-
var temp = JsonUtility.ToString(mockUpdateMessages.Skip(1));
427-
File.WriteAllText(mockUpdatesPath, JsonUtility.ToString(mockUpdateMessages.Skip(1)));
428428
}
429429
}
430430
}

0 commit comments

Comments
 (0)