Merge pull request #8401 from chrisroberts/bundler/prevent-source-paths
Prevent adding local paths to RubyGems sources list
This commit is contained in:
commit
2f4181bad8
|
@ -248,7 +248,11 @@ module Vagrant
|
||||||
|
|
||||||
@logger.debug("Enabling user defined remote RubyGems sources")
|
@logger.debug("Enabling user defined remote RubyGems sources")
|
||||||
all_sources.each do |src|
|
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}")
|
@logger.debug("Adding RubyGems source #{src}")
|
||||||
Gem.sources << src
|
Gem.sources << src
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue