[rubygems/rubygems] Fixed malformed lockfile version on installing
https://github.com/rubygems/rubygems/commit/c969a192bf
This commit is contained in:
parent
b0ec1db8a7
commit
23eb13d49d
@ -170,6 +170,8 @@ module Bundler
|
||||
|
||||
parsed_version = Bundler::LockfileParser.bundled_with
|
||||
@lockfile_version = parsed_version ? Gem::Version.new(parsed_version) : nil
|
||||
rescue ArgumentError
|
||||
@lockfile_version = nil
|
||||
end
|
||||
|
||||
def restart_version
|
||||
|
@ -129,6 +129,13 @@ RSpec.describe "Self management", :rubygems => ">= 3.3.0.dev", :realworld => tru
|
||||
expect(out).to eq(Bundler::VERSION[0] == "2" ? "Bundler version #{Bundler::VERSION}" : Bundler::VERSION)
|
||||
end
|
||||
|
||||
it "ignores malformed lockfile version" do
|
||||
lockfile_bundled_with("2.3.")
|
||||
|
||||
bundle "install --verbose"
|
||||
expect(out).to include("Using bundler #{Bundler::VERSION}")
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def lockfile_bundled_with(version)
|
||||
|
Loading…
x
Reference in New Issue
Block a user