Skip to content

Commit

Permalink
Cause SIGNINT,PIPE to exit
Browse files Browse the repository at this point in the history
Instead of dumping a stack trace
  • Loading branch information
danielbeardsley committed Apr 19, 2013
1 parent 4da62b7 commit 3687eed
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions bin/feature
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require_relative '../lib/signal_handlers.rb'
require_relative '../lib/github.rb' require_relative '../lib/github.rb'
require_relative '../lib/git.rb' require_relative '../lib/git.rb'
require_relative '../lib/helpers.rb' require_relative '../lib/helpers.rb'
Expand Down
1 change: 1 addition & 0 deletions bin/hotfix
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require_relative '../lib/signal_handlers.rb'
require_relative '../lib/github.rb' require_relative '../lib/github.rb'
require_relative '../lib/git.rb' require_relative '../lib/git.rb'
require_relative '../lib/helpers.rb' require_relative '../lib/helpers.rb'
Expand Down
1 change: 1 addition & 0 deletions lib/helpers.rb
Expand Up @@ -163,3 +163,4 @@ def wrap_text(txt, col = 80)
/(.{1,#{col}})(?: +|$)\n?|(.{#{col}})/, /(.{1,#{col}})(?: +|$)\n?|(.{#{col}})/,
"\\1\\3\n") "\\1\\3\n")
end end

3 changes: 3 additions & 0 deletions 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"

0 comments on commit 3687eed

Please sign in to comment.