Clean up gem sources modifications

Based on suggestions from @zenspider here:
3daf3e532d (r33408747)
This commit is contained in:
Chris Roberts 2019-06-05 09:28:40 -07:00
parent ce56739b29
commit 07b9f39a54
1 changed files with 2 additions and 6 deletions

View File

@ -76,12 +76,8 @@ module Vagrant
# Add HashiCorp RubyGems source
if !Gem.sources.include?(HASHICORP_GEMSTORE)
current_sources = Gem.sources.sources.dup
Gem.sources.clear
Gem.sources << HASHICORP_GEMSTORE
current_sources.each do |src|
Gem.sources << src
end
sources = [HASHICORP_GEMSTORE] + Gem.sources.sources
Gem.sources.replace(sources)
end
# Generate dependencies for all registered plugins