vagrant plugin list works properly with isolated gem env
This commit is contained in:
parent
b482870173
commit
bfc8c62ffe
|
@ -20,14 +20,11 @@ module VagrantPlugins
|
||||||
# Get the list of installed plugins according to the state file
|
# Get the list of installed plugins according to the state file
|
||||||
installed = Set.new(env[:plugin_state_file].installed_plugins)
|
installed = Set.new(env[:plugin_state_file].installed_plugins)
|
||||||
|
|
||||||
# Get the actual specifications of installed gems
|
# Go through the plugins installed in this environment and
|
||||||
specs = env[:gem_helper].with_environment do
|
# get the latest version of each.
|
||||||
Gem::Specification.find_all
|
|
||||||
end
|
|
||||||
|
|
||||||
# Get the latest version of the installed plugins
|
|
||||||
installed_map = {}
|
installed_map = {}
|
||||||
specs.each do |spec|
|
env[:gem_helper].with_environment do
|
||||||
|
Gem::Specification.find_all.each do |spec|
|
||||||
# Ignore specs that aren't in our installed list
|
# Ignore specs that aren't in our installed list
|
||||||
next if !installed.include?(spec.name)
|
next if !installed.include?(spec.name)
|
||||||
|
|
||||||
|
@ -38,6 +35,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
installed_map[spec.name] = spec
|
installed_map[spec.name] = spec
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Output!
|
# Output!
|
||||||
if installed_map.empty?
|
if installed_map.empty?
|
||||||
|
|
Loading…
Reference in New Issue