aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-11-19 13:13:19 +0100
committergit <svn-admin@ruby-lang.org>2022-07-18 19:07:47 +0900
commit01560e1c53ce2e1fcf3cdc2480c6f75ca7c6f0a6 (patch)
tree7e24ede96729c49aac0055a38ce65e339e6ca2ab /lib
parent82add06f9cbe00ad611e99692d8d49b77159c601 (diff)
downloadruby-01560e1c53ce2e1fcf3cdc2480c6f75ca7c6f0a6.tar.gz
[rubygems/rubygems] Improve error message when gems cannot be found
Include the source of each gem. https://github.com/rubygems/rubygems/commit/a0bed2fb79
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/definition.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 0580860845..8f43befe35 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -495,7 +495,11 @@ module Bundler
"removed in order to install."
end
- raise GemNotFound, "Could not find #{missing_specs.map(&:full_name).join(", ")} in any of the sources"
+ missing_specs_list = missing_specs.group_by(&:source).map do |source, missing_specs_for_source|
+ "#{missing_specs_for_source.map(&:full_name).join(", ")} in #{source}"
+ end
+
+ raise GemNotFound, "Could not find #{missing_specs_list.join(" nor ")}"
end
unless specs["bundler"].any?