chrisfsampaio / imsg

Chat using iMessage from your terminal!
MIT License
693 stars 51 forks source link

Gracefully handle exit signals. #7

Closed ryanseys closed 10 years ago

ryanseys commented 10 years ago

If you hit Control+C then it blows chunks all over the terminal (before closing, as expected).

^C/Users/rseys/.rvm/gems/ruby-1.9.3-p448/gems/imsg-0.0.2/lib/imsg.rb:42:in `gets': Interrupt
    from /Users/rseys/.rvm/gems/ruby-1.9.3-p448/gems/imsg-0.0.2/lib/imsg.rb:42:in `gets'
    from /Users/rseys/.rvm/gems/ruby-1.9.3-p448/gems/imsg-0.0.2/lib/imsg.rb:42:in `<top (required)>'
    from /Users/rseys/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/rseys/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/rseys/.rvm/gems/ruby-1.9.3-p448/gems/imsg-0.0.2/bin/imsg:2:in `<top (required)>'
    from /Users/rseys/.rvm/gems/ruby-1.9.3-p448/bin/imsg:23:in `load'
    from /Users/rseys/.rvm/gems/ruby-1.9.3-p448/bin/imsg:23:in `<main>'
chrisfsampaio commented 10 years ago

Hey @ryanseys, commit bb0870381fe3bc5a806fa31061fbf3868181f194 has just covered this issue! :smile: Thanks for your contribution! :+1:

ryanseys commented 10 years ago

Great work Chris!