diff options
Diffstat (limited to 'lib/bundler/cli.rb')
-rw-r--r-- | lib/bundler/cli.rb | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index 40f19c7fed..76a198b2ae 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -65,7 +65,7 @@ module Bundler Bundler.reset_settings_and_root! end - Bundler.self_manager.restart_with_locked_bundler_if_needed + Bundler.auto_switch Bundler.settings.set_command_option_if_given :retry, options[:retry] @@ -229,6 +229,8 @@ module Bundler method_option "system", type: :boolean, banner: "Install to the system location ($BUNDLE_PATH or $GEM_HOME) even if the bundle was previously installed somewhere else for this application" method_option "trust-policy", alias: "P", type: :string, banner: "Gem trust policy (like gem install -P). Must be one of " + Bundler.rubygems.security_policy_keys.join("|") + method_option "target-rbconfig", type: :string, banner: "rbconfig.rb for the deployment target platform" + method_option "without", type: :array, banner: "Exclude gems that are part of the specified named group." method_option "with", type: :array, banner: "Include gems that are part of the specified named group." def install @@ -767,13 +769,10 @@ module Bundler return unless SharedHelpers.md5_available? - latest = Fetcher::CompactIndex. - new(nil, Source::Rubygems::Remote.new(Gem::URI("https://rubygems.org")), nil, nil). - send(:compact_index_client). - instance_variable_get(:@cache). - dependencies("bundler"). - map {|d| Gem::Version.new(d.first) }. - max + require_relative "vendored_uri" + remote = Source::Rubygems::Remote.new(Gem::URI("https://rubygems.org")) + cache_path = Bundler.user_cache.join("compact_index", remote.cache_slug) + latest = Bundler::CompactIndexClient.new(cache_path).latest_version("bundler") return unless latest current = Gem::Version.new(VERSION) |