diff --git a/src/Runner.Worker/Dap/YamlScalarFormatter.cs b/src/Runner.Worker/Dap/YamlScalarFormatter.cs index 15fa3f380..2191f1c29 100644 --- a/src/Runner.Worker/Dap/YamlScalarFormatter.cs +++ b/src/Runner.Worker/Dap/YamlScalarFormatter.cs @@ -57,7 +57,7 @@ namespace GitHub.Runner.Worker.Dap { raw = raw.Substring(0, raw.Length - DocEndMarker.Length); } - return raw.TrimEnd('\n'); + return raw; } } } diff --git a/src/Test/L0/Worker/YamlScalarFormatterL0.cs b/src/Test/L0/Worker/YamlScalarFormatterL0.cs index e4c441035..4c8ac320c 100644 --- a/src/Test/L0/Worker/YamlScalarFormatterL0.cs +++ b/src/Test/L0/Worker/YamlScalarFormatterL0.cs @@ -27,7 +27,7 @@ namespace GitHub.Runner.Common.Tests.Worker catch (Exception ex) { throw new Xunit.Sdk.XunitException( - $"Formatted scalar did not round-trip as valid YAML.\nInput: '{value}'\nFormatted: '{scalar}'\nFull YAML:\n{yaml}\nError: {ex.Message}"); + $"Formatted scalar did not round-trip as valid YAML.\nInput: '{value}'\nFormatted: '{scalar}'\nFull YAML:\n{yaml}\nError: {ex}"); } Assert.NotNull(doc); Assert.True(doc.ContainsKey("k"), $"missing key in parsed doc. Formatted: '{scalar}'");