Method: Bundler::SelfManager#install_locked_bundler_and_restart_with_it_if_needed

Defined in:
lib/bundler/self_manager.rb

#install_locked_bundler_and_restart_with_it_if_neededObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/bundler/self_manager.rb', line 15

def install_locked_bundler_and_restart_with_it_if_needed
  return unless needs_switching?

  if restart_version == lockfile_version
    Bundler.ui.info \
      "Bundler #{current_version} is running, but your lockfile was generated with #{lockfile_version}. " \
      "Installing Bundler #{lockfile_version} and restarting using that version."
  else
    Bundler.ui.info \
      "Bundler #{current_version} is running, but your configuration was #{restart_version}. " \
      "Installing Bundler #{restart_version} and restarting using that version."
  end

  install_and_restart_with(restart_version)
end