Merge pull request #8401 from chrisroberts/bundler/prevent-source-paths

Prevent adding local paths to RubyGems sources list
This commit is contained in:
Chris Roberts 2017-03-23 09:46:08 -07:00 committed by GitHub
commit 2f4181bad8
1 changed files with 5 additions and 1 deletions

View File

@ -248,7 +248,11 @@ module Vagrant
@logger.debug("Enabling user defined remote RubyGems sources")
all_sources.each do |src|
next if URI.parse(src).scheme.nil?
begin
next if File.file?(src) || URI.parse(src).scheme.nil?
rescue URI::InvalidURIError
next
end
@logger.debug("Adding RubyGems source #{src}")
Gem.sources << src
end