diff options
author | David Kellum <dek-oss@gravitext.com> | 2017-10-11 14:04:22 -0700 |
---|---|---|
committer | David Kellum <dek-oss@gravitext.com> | 2017-10-14 06:37:39 -0700 |
commit | a0c1d73418254ba0659ff7c58da34348345fc980 (patch) | |
tree | 99d84b58bd4cf7beb1452f5601101a931928a531 | |
parent | fea177f61df71121c6f9422a74b093e42c504388 (diff) | |
download | bundler-a0c1d73418254ba0659ff7c58da34348345fc980.tar.gz |
Avoid rescue of SignalException in kernel_load and with_friendly_errors
This allows SignalException to be handled gracefully by the ruby
interpreter.
(rebased on to master with CI Fix, 6084)
github: fixes #6090
-rw-r--r-- | lib/bundler/cli/exec.rb | 2 | ||||
-rw-r--r-- | lib/bundler/friendly_errors.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/cli/exec.rb b/lib/bundler/cli/exec.rb index 4b4a621879..2fdc614fbb 100644 --- a/lib/bundler/cli/exec.rb +++ b/lib/bundler/cli/exec.rb @@ -73,7 +73,7 @@ module Bundler signals = Signal.list.keys - RESERVED_SIGNALS signals.each {|s| trap(s, "DEFAULT") } Kernel.load(file) - rescue SystemExit + rescue SystemExit, SignalException raise rescue Exception => e # rubocop:disable Lint/RescueException Bundler.ui = ui diff --git a/lib/bundler/friendly_errors.rb b/lib/bundler/friendly_errors.rb index 51dd60c931..f624185773 100644 --- a/lib/bundler/friendly_errors.rb +++ b/lib/bundler/friendly_errors.rb @@ -120,6 +120,8 @@ module Bundler def self.with_friendly_errors yield + rescue SignalException + raise rescue Exception => e FriendlyErrors.log_error(e) exit FriendlyErrors.exit_status(e) |