summaryrefslogtreecommitdiff
path: root/lib/bundler
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-12-15 13:28:50 +0100
committergit <svn-admin@ruby-lang.org>2021-12-17 16:35:20 +0900
commit8d29d1292b35ad524ce15f82177a2975da43432d (patch)
tree9fcdf543b087528b7a82ae1951beb86443382541 /lib/bundler
parent1537471871f9a06624689b55be222f0ea601d140 (diff)
[rubygems/rubygems] Improve errors a bit more
https://github.com/rubygems/rubygems/commit/f481e8f41a
Diffstat (limited to 'lib/bundler')
-rw-r--r--lib/bundler/resolver.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb
index 37c27f213d..22d61fba36 100644
--- a/lib/bundler/resolver.rb
+++ b/lib/bundler/resolver.rb
@@ -287,7 +287,12 @@ module Bundler
end
message = String.new("Could not find gem '#{requirement_label}'#{extra_message} in #{source}#{cache_message}.\n")
- message << "The source contains the following gems matching '#{matching_part}': #{specs.map(&:full_name).join(", ")}" if specs.any?
+
+ if specs.any?
+ message << "\nThe source contains the following gems matching '#{matching_part}':\n"
+ message << specs.map {|s| " * #{s.full_name}" }.join("\n")
+ end
+
message
end