From 081e62a8a4490598ce8b838f72b950cda1425315 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 23 Oct 2023 09:01:42 -0400 Subject: [PATCH] fix: Fix process helper not redirecting output properly --- .../Engine/ExternalRunner/_Private/ProcessHelper.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Uno.UI.RuntimeTests.Engine.Library/Engine/ExternalRunner/_Private/ProcessHelper.cs b/src/Uno.UI.RuntimeTests.Engine.Library/Engine/ExternalRunner/_Private/ProcessHelper.cs index 8bc46d7..d5656f6 100644 --- a/src/Uno.UI.RuntimeTests.Engine.Library/Engine/ExternalRunner/_Private/ProcessHelper.cs +++ b/src/Uno.UI.RuntimeTests.Engine.Library/Engine/ExternalRunner/_Private/ProcessHelper.cs @@ -40,9 +40,12 @@ public static async Task ExecuteAsync( log.LogTrace("Waiting for process exit"); + process.StartInfo.RedirectStandardOutput = true; + process.StartInfo.RedirectStandardError = true; + // hookup the event handlers to capture the data that is received - process.OutputDataReceived += (sender, args) => output.Append(args.Data); - process.ErrorDataReceived += (sender, args) => error.Append(args.Data); + process.OutputDataReceived += (sender, args) => output.AppendLine(args.Data); + process.ErrorDataReceived += (sender, args) => error.AppendLine(args.Data); if (ct.IsCancellationRequested) {