Skip to content

fix: add CancellationToken to Command Execute methods - #17

Merged
phmatray merged 2 commits into
mainfrom
fix/spectre-console-cli-breaking-change
Mar 9, 2026
Merged

phmatray merged 2 commits into
mainfrom
fix/spectre-console-cli-breaking-change

Conversation

@phmatray

@phmatray phmatray commented Mar 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Spectre.Console.Cli v0.53.1 introduced a breaking change: Command<T>.Execute now requires a CancellationToken parameter
  • Updated all four command classes (FileCommand, FolderCommand, ProjectCommand, SolutionCommand) to match the new abstract method signature
  • This fixes the 8 build errors (CS0115 and CS0534) that have been failing CI since 2026-03-04

Test plan

  • Verified the project builds successfully with dotnet build --configuration Release
  • CI should pass on this PR (build + test on ubuntu-latest, windows-latest, macos-latest)

phmatray added 2 commits March 9, 2026 11:08
Spectre.Console.Cli v0.53.1 changed the Command<T> base class to
require a CancellationToken parameter in the Execute method signature.
Update all four command classes to match the new abstract method.
…erlet

The coverage job was using `dotnet run -- --coverage` flags which are not
recognized by the xUnit v3 Microsoft Testing Platform runner. Switch to
`dotnet test --collect:"XPlat Code Coverage"` with coverlet.collector
package, which is the standard approach for collecting code coverage with
xUnit v3.
@phmatray
phmatray merged commit a19e7bc into main Mar 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant