Skip to content

Commit c13ebc3

Browse files
authored
Formatting
1 parent 70f8576 commit c13ebc3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/Runner.Listener/SelfUpdater.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ private async Task DownloadLatestRunner(CancellationToken token, string targetVe
266266

267267
try
268268
{
269+
#if DEBUG
269270
// Much of the update process (targetVersion, archive) is server-side, this is a way to control it from here for testing specific update scenarios
270271
// Add files like 'runner_v2.281.2.tar.gz' or 'runner_v2.283.0.zip' depending on your platform in your runner root folder
271272
// Note that runners still need to be behind the server's runner version in order to receive an 'AgentRefreshMessage' and trigger this update
@@ -294,16 +295,16 @@ private async Task DownloadLatestRunner(CancellationToken token, string targetVe
294295

295296
if (File.Exists(archiveFile))
296297
{
297-
_terminal.WriteLine($"Mock target version is: {targetVersion}");
298-
_updateTrace.Add($"Mocking update with file: {archiveFile}, nothing is downloaded");
299-
_terminal.WriteLine($"Mocking update with file: {archiveFile}, nothing is downloaded");
298+
_updateTrace.Enqueue($"Mocking update with file: '{archiveFile}' and targetVersion: '{targetVersion}', nothing is downloaded");
299+
_terminal.WriteLine($"Mocking update with file: '{archiveFile}' and targetVersion: '{targetVersion}', nothing is downloaded");
300300
}
301301
else
302302
{
303303
_terminal.WriteLine($"Mock runner archive not found at {archiveFile} for target version {targetVersion}, proceeding with download instead");
304304
archiveFile = null;
305305
}
306306
}
307+
#endif
307308
// archiveFile is not null only if we mocked it above
308309
if (archiveFile == null)
309310
{
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "2.283.2": {"targetVersion":"2.284.1"}, "2.284.1": {"targetVersion":"2.285.0"}}
1+
{ "2.283.2": {"targetVersion":"2.284.1"}, "2.284.1": {"targetVersion":"2.285.0"}}

0 commit comments

Comments
 (0)