summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThe Bundler Bot <bot@bundler.io>2018-03-05 00:18:55 +0000
committerColby Swandale <me@colby.fyi>2018-04-20 10:27:32 +1000
commit29c9a0611f02fb3a3a46cce4cf605e541ce49bfa (patch)
tree64e38f7519b8b023e1377df2b651b39f5092a2b9
parent3db6273ee1b6120c493a0ea2f7dcd0109a9769e0 (diff)
downloadbundler-29c9a0611f02fb3a3a46cce4cf605e541ce49bfa.tar.gz
Auto merge of #6307 - alyssais:yanked_message, r=indirect
Improve yanked gem error message The problem was that the error message for a yanked Gem told the user to: > update your bundle to a different version of foo (1.0) This is slightly misleading because in this example, foo 1.0 is the version that has been yanked. They should use any verion of foo **other** than 1.0. My diagnosis was that the error message interpolated the gem specification (which converts to a string as "NAME (VERSION)") rather than just the name of the gem in this instance. My fix was to change that occurrence of the gem specification to just the gem name. I chose this fix because it was the only way that occurred to me to do it. (cherry picked from commit 1f6469ffa4aa92e3ab0fe0eea74ee461fcbfee4a)
-rw-r--r--lib/bundler/definition.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 79cdaebba5..4c4b90ef37 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -176,7 +176,7 @@ module Bundler
raise GemNotFound, "Your bundle is locked to #{locked_gem}, but that version could not " \
"be found in any of the sources listed in your Gemfile. If you haven't changed sources, " \
"that means the author of #{locked_gem} has removed it. You'll need to update your bundle " \
- "to a different version of #{locked_gem} that hasn't been removed in order to install."
+ "to a version other than #{locked_gem} that hasn't been removed in order to install."
end
unless specs["bundler"].any?
bundler = sources.metadata_source.specs.search(Gem::Dependency.new("bundler", VERSION)).last