summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-26 20:00:45 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-27 12:54:55 +0200
commite1d534ae6f749d2ef976ea77d787914681be2b1a (patch)
treeb9a5a63461121b9412bcdbf32418559732ef7b1c
parent1113640bcc4e6c8849e5d124015d4d9c69b1a3b2 (diff)
downloadbundler-e1d534ae6f749d2ef976ea77d787914681be2b1a.tar.gz
Remove hard errors on version mismatches
This is already short-circuit by rubygems' bundler version finder.
-rw-r--r--lib/bundler/lockfile_parser.rb3
-rw-r--r--spec/lock/lockfile_spec.rb27
2 files changed, 0 insertions, 30 deletions
diff --git a/lib/bundler/lockfile_parser.rb b/lib/bundler/lockfile_parser.rb
index 8706b881c1..5658ec1205 100644
--- a/lib/bundler/lockfile_parser.rb
+++ b/lib/bundler/lockfile_parser.rb
@@ -101,9 +101,6 @@ module Bundler
return unless bundler_version
prerelease_text = bundler_version.prerelease? ? " --pre" : ""
current_version = Gem::Version.create(Bundler::VERSION)
- if current_version.segments.first < bundler_version.segments.first
- raise LockfileError, "You must use Bundler #{bundler_version.segments.first} or greater with this lockfile."
- end
return unless current_version < bundler_version
Bundler.ui.warn "Warning: the running version of Bundler (#{current_version}) is older " \
"than the version that created the lockfile (#{bundler_version}). We suggest you to " \
diff --git a/spec/lock/lockfile_spec.rb b/spec/lock/lockfile_spec.rb
index ed310c48a5..e71050ec0c 100644
--- a/spec/lock/lockfile_spec.rb
+++ b/spec/lock/lockfile_spec.rb
@@ -203,33 +203,6 @@ RSpec.describe "the lockfile format" do
G
end
- it "errors if the current is a major version older than lockfile's bundler version", :bundler => "3" do
- lockfile <<-L
- GEM
- remote: file://localhost#{gem_repo1}/
- specs:
- rack (1.0.0)
-
- PLATFORMS
- #{lockfile_platforms}
-
- DEPENDENCIES
- rack
-
- BUNDLED WITH
- 9999999.0.0
- L
-
- install_gemfile <<-G
- source "file://localhost#{gem_repo1}/"
-
- gem "rack"
- G
-
- expect(last_command).to be_failure
- expect(err).to include("You must use Bundler 9999999 or greater with this lockfile.")
- end
-
it "warns when updating bundler major version" do
lockfile <<-L
GEM