Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cause SIGNINT,PIPE to exit

Instead of dumping a stack trace
  • Loading branch information...
commit 3687eedb8a9a269d88917e1ffef654581284ffbf 1 parent 4da62b7
@danielbeardsley danielbeardsley authored
View
1  bin/feature
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
+require_relative '../lib/signal_handlers.rb'
require_relative '../lib/github.rb'
require_relative '../lib/git.rb'
require_relative '../lib/helpers.rb'
View
1  bin/hotfix
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
+require_relative '../lib/signal_handlers.rb'
require_relative '../lib/github.rb'
require_relative '../lib/git.rb'
require_relative '../lib/helpers.rb'
View
1  lib/helpers.rb
@@ -163,3 +163,4 @@ def wrap_text(txt, col = 80)
/(.{1,#{col}})(?: +|$)\n?|(.{#{col}})/,
"\\1\\3\n")
end
+
View
3  lib/signal_handlers.rb
@@ -0,0 +1,3 @@
+# On a Ctrl-C or a broken pipe, just exit instead of printing a stack strace
+trap "INT", "EXIT"
+trap "PIPE", "EXIT"
Please sign in to comment.
Something went wrong with that request. Please try again.