Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit d12c143

Browse files
Fixing error redirection
1 parent 5aeb275 commit d12c143

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/GitHub.Api/NewTaskSystem/ProcessTask.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ class ProcessWrapper
5656
private readonly Action onEnd;
5757
private readonly Action<Exception, string> onError;
5858
private readonly CancellationToken token;
59-
private readonly List<string> errors = new List<string>();
6059

6160
public Process Process { get; }
6261
public StreamWriter Input { get; private set; }
@@ -103,8 +102,9 @@ public void Run()
103102
if (Process.StartInfo.RedirectStandardInput)
104103
Input = new StreamWriter(Process.StandardInput.BaseStream, new UTF8Encoding(false));
105104

106-
onStart?.Invoke();
105+
var errors = new List<string>();
107106

107+
onStart?.Invoke();
108108
if (Process.StartInfo.CreateNoWindow)
109109
{
110110
if (Process.StartInfo.RedirectStandardOutput)
@@ -130,7 +130,7 @@ public void Run()
130130
outputProcessor.LineReceived(null);
131131
}
132132

133-
if (!Process.StartInfo.RedirectStandardError)
133+
if (Process.StartInfo.RedirectStandardError)
134134
{
135135
var errorStream = Process.StandardError;
136136
var errorLine = errorStream.ReadLine();

0 commit comments

Comments
 (0)