@@ -42,7 +42,7 @@ internal static string RunProcessReturnOutput(string executable, string argument
42
42
43
43
using ( AutoResetEvent outputWaitHandle = new AutoResetEvent ( false ) )
44
44
using ( AutoResetEvent errorWaitHandle = new AutoResetEvent ( false ) )
45
- return HandleOutput ( p , outputWaitHandle , errorWaitHandle , timeout ) ;
45
+ return HandleOutput ( p , outputWaitHandle , errorWaitHandle , timeout , false ) ;
46
46
}
47
47
}
48
48
@@ -62,11 +62,11 @@ internal static string RunProcessReturnOutput(string executable, string argument
62
62
63
63
using ( AutoResetEvent outputWaitHandle = new AutoResetEvent ( false ) )
64
64
using ( AutoResetEvent errorWaitHandle = new AutoResetEvent ( false ) )
65
- return HandleOutput ( p , outputWaitHandle , errorWaitHandle , timeout ) ;
65
+ return HandleOutput ( p , outputWaitHandle , errorWaitHandle , timeout , forceRegular ) ;
66
66
}
67
67
}
68
68
69
- private static string HandleOutput ( Process p , AutoResetEvent outputWaitHandle , AutoResetEvent errorWaitHandle , int timeout )
69
+ private static string HandleOutput ( Process p , AutoResetEvent outputWaitHandle , AutoResetEvent errorWaitHandle , int timeout , bool forceRegular )
70
70
{
71
71
StringBuilder output = new StringBuilder ( ) ;
72
72
StringBuilder error = new StringBuilder ( ) ;
@@ -95,7 +95,7 @@ private static string HandleOutput(Process p, AutoResetEvent outputWaitHandle, A
95
95
{
96
96
string strReturn = "" ;
97
97
98
- if ( error . ToString ( ) . Trim ( ) . Length . Equals ( 0 ) )
98
+ if ( error . ToString ( ) . Trim ( ) . Length . Equals ( 0 ) || forceRegular )
99
99
strReturn = output . ToString ( ) . Trim ( ) ;
100
100
else
101
101
strReturn = error . ToString ( ) . Trim ( ) ;
0 commit comments