mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
Minor GetProcStdOut improvement to avoid issues if stderr piping was already in the command line
This commit is contained in:
@@ -20,7 +20,7 @@ namespace Flowframes.Os
|
|||||||
{
|
{
|
||||||
public static string GetProcStdOut(Process proc, bool includeStdErr = false, ProcessPriorityClass priority = ProcessPriorityClass.BelowNormal)
|
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.StartInfo.Arguments += " 2>&1";
|
||||||
|
|
||||||
proc.Start();
|
proc.Start();
|
||||||
|
|||||||
Reference in New Issue
Block a user