summaryrefslogtreecommitdiff
path: root/lib/bundler/resolver.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-07-31 12:57:57 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-08-31 19:06:14 +0900
commitb17cdad2f803520ed472605cc8ef7a5350f095f7 (patch)
treec41eb313b015faf28b9bc331488e1ffd1102fc36 /lib/bundler/resolver.rb
parentf1c072912813f9fc226e819f9c3a770869d005c7 (diff)
[rubygems/rubygems] Remove redundant part of error message
It doesn't really add much, in my opinion. We want to be helpful, but also concise when possible. https://github.com/rubygems/rubygems/commit/9d56009cf7
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4789
Diffstat (limited to 'lib/bundler/resolver.rb')
-rw-r--r--lib/bundler/resolver.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb
index a78b2db157..d19dc3e6f3 100644
--- a/lib/bundler/resolver.rb
+++ b/lib/bundler/resolver.rb
@@ -273,11 +273,7 @@ module Bundler
specs = source.specs.search(name)
versions_with_platforms = specs.map {|s| [s.version, s.platform] }
message = String.new("Could not find gem '#{SharedHelpers.pretty_dependency(requirement)}' in #{source}#{cache_message}.\n")
- message << if versions_with_platforms.any?
- "The source contains the following versions of '#{name}': #{formatted_versions_with_platforms(versions_with_platforms)}"
- else
- "The source does not contain any versions of '#{name}'"
- end
+ message << "The source contains the following versions of '#{name}': #{formatted_versions_with_platforms(versions_with_platforms)}" if versions_with_platforms.any?
else
message = "Could not find gem '#{SharedHelpers.pretty_dependency(requirement)}' in any of the gem sources " \
"listed in your Gemfile#{cache_message}."