diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2017-02-22 10:30:56 +1100 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-02-22 10:30:56 +1100 |
commit | 616ebf32816822b70cc865730855928044421285 (patch) | |
tree | 3ee6f05e87cf64d101048f4f4dd92ff4d064af26 /exe | |
parent | 747fee18e234d3794d7106995e5d86e88de6b127 (diff) | |
download | bundler-616ebf32816822b70cc865730855928044421285.tar.gz |
Print a backtrace on SIGINT in debug modeseg-sigint-debug-backtrace
Diffstat (limited to 'exe')
-rwxr-xr-x | exe/bundle | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/exe/bundle b/exe/bundle index ec88ea7552..ab2bde16e2 100755 --- a/exe/bundle +++ b/exe/bundle @@ -2,7 +2,10 @@ # frozen_string_literal: true # Exit cleanly from an early interrupt -Signal.trap("INT") { exit 1 } +Signal.trap("INT") do + Bundler.ui.debug("\n#{caller.join("\n")}") if defined?(Bundler) + exit 1 +end update = "update".start_with?(ARGV.first || " ") && ARGV.find {|a| a.start_with?("--bundler") } update &&= update =~ /--bundler(?:=(.+))?/ && $1 || "> 0.a" |