Skip to content

Commit d91d16e

Browse files
Copilotkzu
andcommitted
Fix Spectre.Console.Cli 0.53.1 API breaking changes
Co-authored-by: kzu <169707+kzu@users.noreply.github.com> Agent-Logs-Url: https://github.com/devlooped/dotnet-gcm/sessions/307cf743-a120-43ee-95a0-37a8cb124ea8
1 parent f5fa74a commit d91d16e

4 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/DeleteCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
extern alias CredentialManager;
22
using System.ComponentModel;
3+
using System.Threading;
34
using System.Threading.Tasks;
45
using Spectre.Console;
56
using Spectre.Console.Cli;
@@ -24,7 +25,7 @@ public override ValidationResult Validate()
2425
}
2526
}
2627

27-
public override async Task<int> ExecuteAsync(CommandContext context, DeleteSettings settings)
28+
public override async Task<int> ExecuteAsync(CommandContext context, DeleteSettings settings, CancellationToken cancellationToken)
2829
{
2930
if (settings.Namespace == null)
3031
{

src/GetCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
extern alias CredentialManager;
22
using System;
33
using System.ComponentModel;
4+
using System.Threading;
45
using System.Threading.Tasks;
56
using Spectre.Console;
67
using Spectre.Console.Cli;
@@ -25,7 +26,7 @@ public override ValidationResult Validate()
2526
}
2627
}
2728

28-
public override async Task<int> ExecuteAsync(CommandContext context, GetSettings settings)
29+
public override async Task<int> ExecuteAsync(CommandContext context, GetSettings settings, CancellationToken cancellationToken)
2930
{
3031
if (settings.Namespace == null)
3132
{

src/SetCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
extern alias CredentialManager;
22
using System.ComponentModel;
3+
using System.Threading;
34
using System.Threading.Tasks;
45
using Spectre.Console.Cli;
56

@@ -8,7 +9,7 @@ namespace Devlooped;
89
[Description("Store a credential.")]
910
public class SetCommand : AsyncCommand<CredentialUrlSettings>
1011
{
11-
public override async Task<int> ExecuteAsync(CommandContext context, CredentialUrlSettings settings)
12+
public override async Task<int> ExecuteAsync(CommandContext context, CredentialUrlSettings settings, CancellationToken cancellationToken)
1213
{
1314
if (settings.Namespace == null)
1415
{

src/SpectreExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static IConfigurator PrettyHelper(this IConfigurator config)
3131
Options = new Spectre.Console.Cli.Help.OptionStyle
3232
{
3333
Header = new Style(Color.Yellow, decoration: Decoration.Bold),
34-
OptionalOption = new Style(Color.Grey),
34+
OptionalOptionValue = new Style(Color.Grey),
3535
RequiredOption = new Style(Color.Blue, decoration: Decoration.Bold),
3636
},
3737
Commands = new Spectre.Console.Cli.Help.CommandStyle

0 commit comments

Comments
 (0)