summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2025-03-12 18:38:10 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2025-03-24 13:25:07 +0900
commit4e1df25b158f35d0aef09ce6e6fd278392cc8230 (patch)
treea7280d9ff6ea7cd38efb7df509a5e376967ede24 /lib
parentbb1b5877a7b2dba79c81275f32b7cc5485323540 (diff)
[rubygems/rubygems] Improve grammar of some error messages
https://github.com/rubygems/rubygems/commit/558a4765c7
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12968
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/definition.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index f8c73cedf2..287037aa2f 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -539,8 +539,9 @@ module Bundler
reason = resolve_needed? ? change_reason : "some dependencies were deleted from your gemfile"
- msg = String.new
- msg << "#{reason.capitalize.strip}, but the lockfile can't be updated because #{update_refused_reason}"
+ msg = String.new("#{reason.capitalize.strip}, but ")
+ msg << "the lockfile " unless msg.start_with?("Your lockfile")
+ msg << "can't be updated because #{update_refused_reason}"
msg << "\n\nYou have added to the Gemfile:\n" << added.join("\n") if added.any?
msg << "\n\nYou have deleted from the Gemfile:\n" << deleted.join("\n") if deleted.any?
msg << "\n\nYou have changed in the Gemfile:\n" << changed.join("\n") if changed.any?