Ctrl+C does not stop synchronous Execute when called from the HostBuilder.RunCommandLineApplicationAsync #449
Labels
bug
closed-stale
This issue is closed because it went stale and there was no action planned. It can be reopened.
help wanted
We would be willing to take a well-written PR to help fix this.
stale
Describe the bug
Our application has many subcommands, some of which are synch, some async. We use the HostBuilder to initialize all the DI objects and as such,
RunCommandLineApplicationAsync
appears to be running the application async regardless of whether or not the eventual commmand is sync or async. From what i have gathered on other related issues if run async, then application shutdown is waited on before exit afterCtrl+C
. I am not explicitly supplying a cancellation token, but theCommandLineLifetime
appears to prevent immediate shutdown, regardlessTo Reproduce
Use
HostBuilder
With a synch subcommand
Start, then press
Ctrl+C
Expected behavior
Ctrl+C
immediately stops applicationAdditional context
This can be worked around with:
The text was updated successfully, but these errors were encountered: