diff --git a/src/System.CommandLine.Suggest.Tests/DotnetSuggestEndToEndTests.cs b/src/System.CommandLine.Suggest.Tests/DotnetSuggestEndToEndTests.cs index e2dfa6c6dc..ef7fbfed17 100644 --- a/src/System.CommandLine.Suggest.Tests/DotnetSuggestEndToEndTests.cs +++ b/src/System.CommandLine.Suggest.Tests/DotnetSuggestEndToEndTests.cs @@ -1,10 +1,9 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System.CommandLine.Invocation; +using FluentAssertions; using System.CommandLine.Tests.Utility; using System.IO; -using FluentAssertions; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -158,7 +157,7 @@ await ExecuteAsync( .Be($"--apple{NewLine}--banana{NewLine}--cherry{NewLine}--durian{NewLine}--help{NewLine}--version{NewLine}-?{NewLine}-h{NewLine}/?{NewLine}/h{NewLine}"); } - public static async Task ExecuteAsync( + private static async Task ExecuteAsync( string command, string args, Action stdOut = null, @@ -216,7 +215,7 @@ public static async Task ExecuteAsync( process.BeginOutputReadLine(); process.BeginErrorReadLine(); - return await process.CompleteAsync(); + await process.WaitForExitAsync(); } } } diff --git a/src/System.CommandLine/Invocation/Process.cs b/src/System.CommandLine/Invocation/Process.cs index 298b1cb757..e7a5283369 100644 --- a/src/System.CommandLine/Invocation/Process.cs +++ b/src/System.CommandLine/Invocation/Process.cs @@ -6,7 +6,7 @@ namespace System.CommandLine.Invocation { - public static class Process + internal static class Process { public static async Task CompleteAsync( this Diagnostics.Process process,