mirror of https://github.com/n00mkrad/flowframes
Minor GetProcStdOut improvement to avoid issues if stderr piping was already in the command line
This commit is contained in:
parent
744f09f7fe
commit
a5c672c682
|
@ -20,7 +20,7 @@ namespace Flowframes.Os
|
|||
{
|
||||
public static string GetProcStdOut(Process proc, bool includeStdErr = false, ProcessPriorityClass priority = ProcessPriorityClass.BelowNormal)
|
||||
{
|
||||
if (includeStdErr)
|
||||
if (includeStdErr && !proc.StartInfo.Arguments.EndsWith("2>&1"))
|
||||
proc.StartInfo.Arguments += " 2>&1";
|
||||
|
||||
proc.Start();
|
||||
|
|
Loading…
Reference in New Issue