mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
[rubygems/rubygems] Don't try to auto-install dev versions of Bundler not available remotely
https://github.com/rubygems/rubygems/commit/1a7a3fdeb9
This commit is contained in:
parent
d0925c075b
commit
5d53993a37
@ -98,10 +98,10 @@ module Bundler
|
||||
|
||||
def needs_switching?
|
||||
autoswitching_applies? &&
|
||||
released?(lockfile_version) &&
|
||||
!running?(lockfile_version) &&
|
||||
!updating? &&
|
||||
Bundler.settings[:version] != "system"
|
||||
Bundler.settings[:version] != "system" &&
|
||||
released?(restart_version) &&
|
||||
!running?(restart_version) &&
|
||||
!updating?
|
||||
end
|
||||
|
||||
def autoswitching_applies?
|
||||
|
||||
@ -176,6 +176,17 @@ RSpec.describe "Self management", rubygems: ">= 3.3.0.dev" do
|
||||
expect(out).to eq(Bundler::VERSION[0] == "2" ? "Bundler version #{Bundler::VERSION}" : Bundler::VERSION)
|
||||
end
|
||||
|
||||
it "does not try to install when using bundle config version <dev-version>" do
|
||||
lockfile_bundled_with(previous_minor)
|
||||
|
||||
bundle "config set version #{previous_minor}.dev"
|
||||
bundle "install"
|
||||
expect(out).not_to match(/restarting using that version/)
|
||||
|
||||
bundle "-v"
|
||||
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.")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user