Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable termination of Hidi processes through pressing the breaking key combinations #1108

Merged
merged 7 commits into from
Dec 19, 2022

Conversation

MaggieKimani1
Copy link
Contributor

@MaggieKimani1 MaggieKimani1 commented Dec 14, 2022

Adds logic to enable process termination by getting an IConsole instance which enables us to listen for the breaking combination CTRL+C and using a CancellationToken to register cancellation and abort the process.
Fixes #884
Reference: dotnet/command-line-api#1750 (comment)

@MaggieKimani1 MaggieKimani1 changed the title Enable termination of Hidi transform process by pressing the breaking key combinations Enable termination of Hidi processes through pressing the breaking key combinations Dec 14, 2022
src/Microsoft.OpenApi.Hidi/Program.cs Outdated Show resolved Hide resolved
src/Microsoft.OpenApi.Hidi/Program.cs Outdated Show resolved Hide resolved
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for taking in the suggested changes!

@MaggieKimani1 MaggieKimani1 merged commit 760445c into vnext Dec 19, 2022
@MaggieKimani1 MaggieKimani1 deleted the mk/terminate-process branch December 19, 2022 16:22
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.

[hidi] hidi transform can't be cancelled or aborted. Process needs to be killed manually.
2 participants