bin/cure in cureutils-0.1.5 vs bin/cure in cureutils-0.2.0
- old
+ new
@@ -1,4 +1,13 @@
#!/usr/bin/env ruby
-require "cureutils"
-Cureutils::CLI.start
\ No newline at end of file
+# Trap intrrupts to quit cleanly.
+# Refer to https://twitter.com/mitchellh/status/283014103189053442
+Signal.trap('INT') { abort }
+
+require 'cureutils'
+
+begin
+ Cureutils::CLI.start
+rescue Interrupt
+ abort('Interrupted...')
+end