Use the HashiCorp gem source for plugin installs

This commit is contained in:
Mitchell Hashimoto 2013-02-04 11:18:57 -08:00
parent c6a4bd529d
commit bc7237130d
1 changed files with 7 additions and 1 deletions

View File

@ -26,6 +26,11 @@ module VagrantPlugins
# Clear paths so that it reads the new GEM_HOME setting
Gem.paths = ENV
# Clear the sources so that installation uses custom sources
old_sources = Gem.sources
Gem.sources = Gem.default_sources
Gem.sources << "http://gems.hashicorp.com"
# Use a silent UI so that we have no output
Gem::DefaultUserInteraction.use_ui(Gem::SilentUI.new) do
return yield
@ -37,6 +42,7 @@ module VagrantPlugins
# Reset everything
Gem.paths = ENV
Gem.sources = old_sources.to_a
end
end
end