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

Do not continue doing things after Ctrl+C #56

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

marcparadise
Copy link
Member

Call Kernel.exit! 1 to force an immediate error-exit
if the operator uses Ctrl+C to prevent performing post-hook steps.

Signed-off-by: Marc A. Paradise [email protected]

@marcparadise marcparadise force-pushed the mp/fix-ctrl-c-on-cleanse branch 3 times, most recently from e31b682 to 3967fa9 Compare April 3, 2017 19:43
@@ -322,7 +322,7 @@ def scary_cleanse_warning(*args)
sleep 60
rescue Interrupt
log ""
exit 0
Kernel.exit 1
Copy link
Member Author

Choose a reason for hiding this comment

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

THese seemed a safe exit code change to make, because this is handling for when the operator explicitly does not pass the --yes argument that will bypass the wait period

Interrupted CLIs typically exit non-zero.

@tas50
Copy link
Contributor

tas50 commented Sep 20, 2021

@marcparadise Is this something we want to get merged in still? Seems worth shipping.

@marcparadise
Copy link
Member Author

Yeah, this looks like something that we still want.

Call Kernel.exit! 1 to force an immediate error-exit
if the operator uses Ctrl+C to prevent performing post-hook steps.

Signed-off-by: Marc A. Paradise <[email protected]>
@sonarcloud
Copy link

sonarcloud bot commented May 3, 2022

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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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.

3 participants