Marvin Huber
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
22 additions and
18 deletions
-
src/Microsoft.Tye.Core/ProcessUtil.cs
|
|
@ -66,32 +66,36 @@ namespace Microsoft.Tye |
|
|
var outputBuilder = new StringBuilder(); |
|
|
var outputBuilder = new StringBuilder(); |
|
|
process.OutputDataReceived += (_, e) => |
|
|
process.OutputDataReceived += (_, e) => |
|
|
{ |
|
|
{ |
|
|
if (e.Data != null) |
|
|
if (e.Data == null) |
|
|
{ |
|
|
{ |
|
|
if (outputDataReceived != null) |
|
|
return; |
|
|
{ |
|
|
} |
|
|
outputDataReceived.Invoke(e.Data); |
|
|
|
|
|
} |
|
|
if (outputDataReceived != null) |
|
|
else |
|
|
{ |
|
|
{ |
|
|
outputDataReceived.Invoke(e.Data); |
|
|
outputBuilder.AppendLine(e.Data); |
|
|
} |
|
|
} |
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
outputBuilder.AppendLine(e.Data); |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
var errorBuilder = new StringBuilder(); |
|
|
var errorBuilder = new StringBuilder(); |
|
|
process.ErrorDataReceived += (_, e) => |
|
|
process.ErrorDataReceived += (_, e) => |
|
|
{ |
|
|
{ |
|
|
if (e.Data != null) |
|
|
if (e.Data == null) |
|
|
{ |
|
|
{ |
|
|
if (errorDataReceived != null) |
|
|
return; |
|
|
{ |
|
|
} |
|
|
errorDataReceived.Invoke(e.Data); |
|
|
|
|
|
} |
|
|
if (errorDataReceived != null) |
|
|
else |
|
|
{ |
|
|
{ |
|
|
errorDataReceived.Invoke(e.Data); |
|
|
errorBuilder.AppendLine(e.Data); |
|
|
} |
|
|
} |
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
errorBuilder.AppendLine(e.Data); |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|