Use the HashiCorp gem source for plugin installs
This commit is contained in:
parent
c6a4bd529d
commit
bc7237130d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue