Remove existing items from request set prior to installation

This commit is contained in:
Chris Roberts 2018-05-08 13:52:23 -07:00
parent d58096da31
commit 91018d4edc
1 changed files with 9 additions and 0 deletions

View File

@ -303,6 +303,15 @@ module Vagrant
solution = request_set.resolve(installer_set)
activate_solution(solution)
# Remove gems which are already installed
request_set.sorted_requests.delete_if do |activation_req|
rs_spec = activation_req.spec
if vagrant_internal_specs.detect{|ispec| ispec.name == rs_spec.name && ispec.version == rs_spec.version }
@logger.debug("Removing activation request from install. Already installed. (#{rs_spec.spec.full_name})")
true
end
end
@logger.debug("Installing required gems.")
# Install all remote gems into plugin path. Set the installer to ignore dependencies