Skip to content

Conversation

@geofflamrock
Copy link
Owner

I'm trying to move to using the .Net Generic Host to provide logging, DI and other goodies. A blocker is that when using IHost with System.CommandLine, if the user is selecting something from a Spectre.Console prompt (e.g. a list of stacks) then cancelling the program with Ctrl+C doesn't work. I've traced this back to the cancellation token that the host uses not being passed through to the prompts in IInputProvider. This PR makes IInputProvider and relevant codepaths async so that this can happen in the future. It also starts the process of making other things like process execution async as well as they really should be.

@geofflamrock geofflamrock force-pushed the async-console-input-provider branch from 5039597 to 6b020e3 Compare August 26, 2025 08:12
@geofflamrock geofflamrock added the internal Changes only affect the internal API label Aug 26, 2025
@geofflamrock geofflamrock merged commit 47bc276 into main Aug 26, 2025
15 checks passed
@geofflamrock geofflamrock deleted the async-console-input-provider branch August 26, 2025 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Changes only affect the internal API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant