core: reset the specification lookup when isolating gems
This commit is contained in:
parent
677275e43c
commit
3f9fb2ef03
|
@ -161,7 +161,10 @@ module Vagrant
|
||||||
# Clear paths so that it reads the new GEM_HOME setting
|
# Clear paths so that it reads the new GEM_HOME setting
|
||||||
Gem.paths = ENV
|
Gem.paths = ENV
|
||||||
|
|
||||||
# Set a custom configuration to avoid loading ~/.gemrc loads and
|
# Reset the all specs override that Bundler does
|
||||||
|
old_all = Gem::Specification._all
|
||||||
|
Gem::Specification.all = nil
|
||||||
|
|
||||||
# /etc/gemrc and so on.
|
# /etc/gemrc and so on.
|
||||||
old_config = nil
|
old_config = nil
|
||||||
begin
|
begin
|
||||||
|
@ -185,6 +188,7 @@ module Vagrant
|
||||||
|
|
||||||
Gem.configuration = old_config
|
Gem.configuration = old_config
|
||||||
Gem.paths = ENV
|
Gem.paths = ENV
|
||||||
|
Gem::Specification.all = old_all
|
||||||
end
|
end
|
||||||
|
|
||||||
# This is pretty hacky but it is a custom implementation of
|
# This is pretty hacky but it is a custom implementation of
|
||||||
|
|
Loading…
Reference in New Issue