summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodriguez <[email protected]>2023-09-25 09:51:33 +0200
committergit <[email protected]>2023-09-27 05:20:57 +0000
commita812f1fed0e6e184447ca00b713d54b25be05911 (patch)
tree61b0a140a005fa7741158eaa41a7d057bbac3a11
parentbc664609df6a5dfb95bc9c604bd0a661b3fbcf26 (diff)
[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
-rw-r--r--lib/bundler/cli/install.rb2
-rw-r--r--lib/bundler/lockfile_parser.rb2
-rw-r--r--spec/bundler/install/deploy_spec.rb4
-rw-r--r--spec/bundler/lock/lockfile_spec.rb2
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index c71bcf159f..3422b19645 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -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
diff --git a/lib/bundler/lockfile_parser.rb b/lib/bundler/lockfile_parser.rb
index 9497108dce..146e728989 100644
--- a/lib/bundler/lockfile_parser.rb
+++ b/lib/bundler/lockfile_parser.rb
@@ -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
diff --git a/spec/bundler/install/deploy_spec.rb b/spec/bundler/install/deploy_spec.rb
index 045d643a8f..f7b41595be 100644
--- a/spec/bundler/install/deploy_spec.rb
+++ b/spec/bundler/install/deploy_spec.rb
@@ -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
diff --git a/spec/bundler/lock/lockfile_spec.rb b/spec/bundler/lock/lockfile_spec.rb
index ccf23a9e3c..5a236dd5d2 100644
--- a/spec/bundler/lock/lockfile_spec.rb
+++ b/spec/bundler/lock/lockfile_spec.rb
@@ -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