Fix `vagrant plugin` commands
`StateFile#installed_plugins` returns now a Hash instead of Array.
Fixes regression from 39b2539
.
This commit is contained in:
parent
ee8f962537
commit
294f4def91
|
@ -18,7 +18,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
def call(env)
|
def call(env)
|
||||||
# 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 = env[:plugin_state_file].installed_plugins.keys
|
||||||
|
|
||||||
# If the plugin we're trying to license doesn't exist in the
|
# If the plugin we're trying to license doesn't exist in the
|
||||||
# state file, then it is an error.
|
# state file, then it is an error.
|
||||||
|
|
|
@ -18,7 +18,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
def call(env)
|
def call(env)
|
||||||
# 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 = env[:plugin_state_file].installed_plugins.keys
|
||||||
|
|
||||||
# Go through the plugins installed in this environment and
|
# Go through the plugins installed in this environment and
|
||||||
# get the latest version of each.
|
# get the latest version of each.
|
||||||
|
|
|
@ -12,7 +12,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
def call(env)
|
def call(env)
|
||||||
# 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 = env[:plugin_state_file].installed_plugins.keys
|
||||||
if !installed.include?(env[:plugin_name])
|
if !installed.include?(env[:plugin_name])
|
||||||
raise Vagrant::Errors::PluginNotInstalled,
|
raise Vagrant::Errors::PluginNotInstalled,
|
||||||
name: env[:plugin_name]
|
name: env[:plugin_name]
|
||||||
|
|
|
@ -34,7 +34,7 @@ module VagrantPlugins
|
||||||
@logger.info("Pruning gems...")
|
@logger.info("Pruning gems...")
|
||||||
|
|
||||||
# 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 = env[:plugin_state_file].installed_plugins.keys
|
||||||
|
|
||||||
# Get the actual specifications of installed gems
|
# Get the actual specifications of installed gems
|
||||||
all_specs = env[:gem_helper].with_environment do
|
all_specs = env[:gem_helper].with_environment do
|
||||||
|
|
|
@ -32,11 +32,11 @@ module VagrantPlugins
|
||||||
save!
|
save!
|
||||||
end
|
end
|
||||||
|
|
||||||
# This returns a list of installed plugins according to the state
|
# This returns a hash of installed plugins according to the state
|
||||||
# file. Note that this may _not_ directly match over to actually
|
# file. Note that this may _not_ directly match over to actually
|
||||||
# installed gems.
|
# installed gems.
|
||||||
#
|
#
|
||||||
# @return [Array<String>]
|
# @return [Hash]
|
||||||
def installed_plugins
|
def installed_plugins
|
||||||
@data["installed"]
|
@data["installed"]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue