1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Show a backtrace in case gem installation fails

For example, due to extension compilation issues.

https://github.com/rubygems/rubygems/commit/adbe55bb6a
This commit is contained in:
David Rodríguez 2021-01-11 14:47:09 +01:00 committed by Hiroshi SHIBATA
parent 4271f4aea5
commit 6eb6f740f2
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2

View file

@ -31,7 +31,7 @@ module Bundler
def specific_failure_message(e)
message = "#{e.class}: #{e.message}\n"
message += " " + e.backtrace.join("\n ") + "\n\n" if Bundler.ui.debug?
message += " " + e.backtrace.join("\n ") + "\n\n"
message = message.lines.first + Bundler.ui.add_color(message.lines.drop(1).join, :clear)
message + Bundler.ui.add_color(failure_message, :red)
end