From 6e6410d300760046f2df8ee90a57b0c3fb0d322b Mon Sep 17 00:00:00 2001 From: Stefan Ruvceski <96768603+ruvceskistefan@users.noreply.github.com> Date: Mon, 12 Sep 2022 20:51:36 +0200 Subject: [PATCH] fix for issue #2009 - composite summary file (#2077) --- src/Runner.Worker/FileCommandManager.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Runner.Worker/FileCommandManager.cs b/src/Runner.Worker/FileCommandManager.cs index a55050de1..145291ccd 100644 --- a/src/Runner.Worker/FileCommandManager.cs +++ b/src/Runner.Worker/FileCommandManager.cs @@ -68,7 +68,7 @@ namespace GitHub.Runner.Worker { try { - fileCommand.ProcessCommand(context, Path.Combine(_fileCommandDirectory, fileCommand.FilePrefix + _fileSuffix),container); + fileCommand.ProcessCommand(context, Path.Combine(_fileCommandDirectory, fileCommand.FilePrefix + _fileSuffix), container); } catch (Exception ex) { @@ -118,7 +118,7 @@ namespace GitHub.Runner.Worker if (File.Exists(filePath)) { var lines = File.ReadAllLines(filePath, Encoding.UTF8); - foreach(var line in lines) + foreach (var line in lines) { if (line == string.Empty) { @@ -312,7 +312,9 @@ namespace GitHub.Runner.Worker } } - var attachmentName = context.Id.ToString(); + var attachmentName = !context.IsEmbedded + ? context.Id.ToString() + : context.EmbeddedId.ToString(); Trace.Info($"Queueing file ({filePath}) for attachment upload ({attachmentName})"); // Attachments must be added to the parent context (job), not the current context (step)