[rubygems/rubygems] Reword a couple of error messages

When a path does not make a lot of sense.

https://github.com/rubygems/rubygems/commit/d173c79e9a
This commit is contained in:
David Rodriguez 2023-09-25 09:51:33 +02:00 коммит произвёл git
Родитель bc664609df
Коммит a812f1fed0
4 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -28,7 +28,7 @@ module Bundler
flag = "--deployment flag" if options[:deployment]
flag ||= "--frozen flag" if options[:frozen]
flag ||= "deployment setting"
raise ProductionError, "The #{flag} requires a #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}. Please make " \
raise ProductionError, "The #{flag} requires a lockfile. Please make " \
"sure you have checked your #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} into version control " \
"before deploying."
end

Просмотреть файл

@ -67,7 +67,7 @@ module Bundler
@specs = {}
if lockfile.match?(/<<<<<<<|=======|>>>>>>>|\|\|\|\|\|\|\|/)
raise LockfileError, "Your #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} contains merge conflicts.\n" \
raise LockfileError, "Your lockfile contains merge conflicts.\n" \
"Run `git checkout HEAD -- #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}` first to get a clean lock."
end

Просмотреть файл

@ -11,12 +11,12 @@ RSpec.describe "install in deployment or frozen mode" do
context "with CLI flags", :bundler => "< 3" do
it "fails without a lockfile and says that --deployment requires a lock" do
bundle "install --deployment", :raise_on_error => false
expect(err).to include("The --deployment flag requires a Gemfile.lock")
expect(err).to include("The --deployment flag requires a lockfile")
end
it "fails without a lockfile and says that --frozen requires a lock" do
bundle "install --frozen", :raise_on_error => false
expect(err).to include("The --frozen flag requires a Gemfile.lock")
expect(err).to include("The --frozen flag requires a lockfile")
end
it "disallows --deployment --system" do

Просмотреть файл

@ -1584,7 +1584,7 @@ RSpec.describe "the lockfile format" do
gem "rack"
G
expect(err).to match(/your Gemfile.lock contains merge conflicts/i)
expect(err).to match(/your lockfile contains merge conflicts/i)
expect(err).to match(/git checkout HEAD -- Gemfile.lock/i)
end