[rubygems/rubygems] Don't try to install locked bundler when --local
is passed
https://github.com/rubygems/rubygems/commit/907d46964d
This commit is contained in:
parent
aa2662d590
commit
cf29594c03
@ -12,7 +12,11 @@ module Bundler
|
|||||||
|
|
||||||
warn_if_root
|
warn_if_root
|
||||||
|
|
||||||
Bundler.self_manager.install_locked_bundler_and_restart_with_it_if_needed
|
if options[:local]
|
||||||
|
Bundler.self_manager.restart_with_locked_bundler_if_needed
|
||||||
|
else
|
||||||
|
Bundler.self_manager.install_locked_bundler_and_restart_with_it_if_needed
|
||||||
|
end
|
||||||
|
|
||||||
Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "1" if Gem.freebsd_platform?
|
Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "1" if Gem.freebsd_platform?
|
||||||
|
|
||||||
|
@ -131,6 +131,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)
|
expect(out).to eq(Bundler::VERSION[0] == "2" ? "Bundler version #{Bundler::VERSION}" : Bundler::VERSION)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "does not try to install when --local is passed" do
|
||||||
|
lockfile_bundled_with(previous_minor)
|
||||||
|
system_gems "myrack-1.0.0", path: default_bundle_path
|
||||||
|
|
||||||
|
bundle "install --local"
|
||||||
|
expect(out).not_to match(/Installing Bundler/)
|
||||||
|
|
||||||
|
bundle "-v"
|
||||||
|
expect(out).to eq(Bundler::VERSION[0] == "2" ? "Bundler version #{Bundler::VERSION}" : Bundler::VERSION)
|
||||||
|
end
|
||||||
|
|
||||||
it "shows a discrete message if locked bundler does not exist" do
|
it "shows a discrete message if locked bundler does not exist" do
|
||||||
missing_minor = "#{Bundler::VERSION[0]}.999.999"
|
missing_minor = "#{Bundler::VERSION[0]}.999.999"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user