diff options
-rw-r--r-- | lib/bundler/cli/exec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bundler/cli/exec.rb b/lib/bundler/cli/exec.rb index 7359f998..095b7b79 100644 --- a/lib/bundler/cli/exec.rb +++ b/lib/bundler/cli/exec.rb @@ -66,7 +66,8 @@ module Bundler rescue Exception => e # rubocop:disable Lint/RescueException Bundler.ui = ui Bundler.ui.error "bundler: failed to load command: #{cmd} (#{file})" - abort "#{e.class}: #{e.message}\n#{e.backtrace.join("\n ")}" + backtrace = e.backtrace.take_while {|bt| !bt.start_with?(__FILE__) } + abort "#{e.class}: #{e.message}\n #{backtrace.join("\n ")}" end def ruby_shebang?(file) |