Set more force flags when uninstalling gems to remove monkeypatch
This commit is contained in:
parent
635949980b
commit
036fa3e96a
|
@ -128,20 +128,13 @@ module VagrantPlugins
|
||||||
env[:gem_helper].with_environment do
|
env[:gem_helper].with_environment do
|
||||||
prune_specs.each do |prune_spec|
|
prune_specs.each do |prune_spec|
|
||||||
uninstaller = Gem::Uninstaller.new(prune_spec.name, {
|
uninstaller = Gem::Uninstaller.new(prune_spec.name, {
|
||||||
|
:all => true,
|
||||||
:executables => true,
|
:executables => true,
|
||||||
:force => true,
|
:force => true,
|
||||||
|
:ignore => true,
|
||||||
:version => prune_spec.version.version
|
:version => prune_spec.version.version
|
||||||
})
|
})
|
||||||
|
|
||||||
# This is sad, but there is no way to force this to be true
|
|
||||||
# so I just monkey-patch here. Vagrant has a pretty strict
|
|
||||||
# version check on the RubyGems version so this should be okay.
|
|
||||||
# In the future, let's try to get a pull request into RubyGems
|
|
||||||
# to fix this.
|
|
||||||
def uninstaller.ask_if_ok(spec)
|
|
||||||
true
|
|
||||||
end
|
|
||||||
|
|
||||||
@logger.info("Uninstalling: #{prune_spec.name} (#{prune_spec.version})")
|
@logger.info("Uninstalling: #{prune_spec.name} (#{prune_spec.version})")
|
||||||
uninstaller.uninstall
|
uninstaller.uninstall
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue