Stream Forwarding changes to not wait on buffer full before writing. Instead input streams will be read character by character as they Console.Write or Console.WriteLine. Upon finding a newline character, the line will be printed to the parent process's console.
This commit is contained in:
parent
129bd03098
commit
ccaaebf6e5
9 changed files with 256 additions and 153 deletions
|
@ -32,8 +32,8 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
var stdOut = new StreamForwarder();
|
||||
var stdErr = new StreamForwarder();
|
||||
|
||||
stdOut.ForwardTo(write: Reporter.Output.Write, writeLine: Reporter.Output.WriteLine);
|
||||
stdErr.ForwardTo(write: Reporter.Error.Write, writeLine: Reporter.Output.WriteLine);
|
||||
stdOut.ForwardTo(writeLine: Reporter.Output.WriteLine);
|
||||
stdErr.ForwardTo(writeLine: Reporter.Output.WriteLine);
|
||||
|
||||
return RunProcess(commandPath, args, stdOut, stdErr);
|
||||
}
|
||||
|
@ -82,8 +82,8 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
var result = new CommandResult(
|
||||
process.StartInfo,
|
||||
process.ExitCode,
|
||||
stdOut.GetCapturedOutput(),
|
||||
stdErr.GetCapturedOutput());
|
||||
stdOut.CapturedOutput,
|
||||
stdErr.CapturedOutput);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue