Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>eaa9717d90115cea43b4cdd7a2a49e6d3c3d780e</Sha>
</Dependency>
<Dependency Name="System.CommandLine" Version="2.0.0-beta4.23307.1">
<Dependency Name="System.CommandLine" Version="2.0.0-beta4.23326.1">
<Uri>https://github.com/dotnet/command-line-api</Uri>
<Sha>02fe27cd6a9b001c8feb7938e6ef4b3799745759</Sha>
<Sha>f6ff2f1a94a58617e744f8fe0d469a2a420a6259</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PropertyGroup>
<!-- Maestro-managed Package Versions - Ordered by repo name -->
<!-- Dependencies from https://github.com/dotnet/command-line-api -->
<SystemCommandLinePackageVersion>2.0.0-beta4.23307.1</SystemCommandLinePackageVersion>
<SystemCommandLinePackageVersion>2.0.0-beta4.23326.1</SystemCommandLinePackageVersion>
<!-- Dependencies from https://github.com/dotnet/runtime -->
<MicrosoftNETCoreAppRefPackageVersion>8.0.0-preview.7.23325.2</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>8.0.0-preview.7.23325.2</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System.CommandLine;
using System.CommandLine.Invocation;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Console;

Expand All @@ -28,13 +29,13 @@ internal ExecutableCommand(string name, string? description = null)
/// </summary>
protected abstract Task<int> ExecuteAsync(TModel args, ILoggerFactory loggerFactory, CancellationToken cancellationToken);

private sealed class CommandAction : CliAction
private sealed class CommandAction : AsynchronousCliAction
{
private readonly ExecutableCommand<TModel> _command;

public CommandAction(ExecutableCommand<TModel> command) => _command = command;

public override int Invoke(ParseResult parseResult) => InvokeAsync(parseResult).GetAwaiter().GetResult();
public int Invoke(ParseResult parseResult) => InvokeAsync(parseResult).GetAwaiter().GetResult();

public override async Task<int> InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken = default)
{
Expand Down