Only read default specifications directory when within bundler context

This commit is contained in:
Chris Roberts 2016-11-22 08:26:43 -08:00
parent a5fb16c7f5
commit 2cc4b82198
1 changed files with 4 additions and 2 deletions

View File

@ -278,8 +278,10 @@ module Vagrant
Gem::Specification.find_all{true}.each do |spec|
list[spec.full_name] = spec
end
directories += Gem::Specification.dirs.find_all do |path|
!path.start_with?(Gem.user_dir)
if(!defined?(::Bundler))
directories += Gem::Specification.dirs.find_all do |path|
!path.start_with?(Gem.user_dir)
end
end
Gem::Specification.each_spec(directories) do |spec|
if !list[spec.full_name]