Skip to content

How to allow graceful control+c? #171

Answered by garrettd714
IdanDavidi asked this question in Q&A
Discussion options

You must be logged in to vote

I added a rescue clause on #execute in command file

rescue TTY::Reader::InputInterrupt
  puts pastel.red('Cancelled input. Data not saved')
end

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@IdanDavidi
Comment options

Comment options

You must be logged in to vote
1 reply
@garrettd714
Comment options

Answer selected by IdanDavidi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants