Browse Source
Simplify Task.WhenAll result handling per review
Made-with: Cursor
pull/25155/head
enisn
7 days ago
No known key found for this signature in database
GPG Key ID: A052619F04155D1C
1 changed files with
2 additions and
4 deletions
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Utils/CmdHelper.cs
|
|
|
@ -141,10 +141,8 @@ public class CmdHelper : ICmdHelper, ITransientDependency |
|
|
|
var outputTask = process.StandardOutput.ReadToEndAsync(); |
|
|
|
var errorTask = process.StandardError.ReadToEndAsync(); |
|
|
|
|
|
|
|
output = Task.WhenAll(outputTask, errorTask).GetAwaiter().GetResult() |
|
|
|
is { Length: 2 } results |
|
|
|
? results[0] + results[1] |
|
|
|
: string.Empty; |
|
|
|
var results = Task.WhenAll(outputTask, errorTask).GetAwaiter().GetResult(); |
|
|
|
output = results[0] + results[1]; |
|
|
|
|
|
|
|
process.WaitForExit(); |
|
|
|
|
|
|
|
|