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)
|
||||
# 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
|
||||
# state file, then it is an error.
|
||||
|
|
|
@ -18,7 +18,7 @@ module VagrantPlugins
|
|||
|
||||
def call(env)
|
||||
# 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
|
||||
# get the latest version of each.
|
||||
|
|
|
@ -12,7 +12,7 @@ module VagrantPlugins
|
|||
|
||||
def call(env)
|
||||
# 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])
|
||||
raise Vagrant::Errors::PluginNotInstalled,
|
||||
name: env[:plugin_name]
|
||||
|
|
|
@ -34,7 +34,7 @@ module VagrantPlugins
|
|||
@logger.info("Pruning gems...")
|
||||
|
||||
# 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
|
||||
all_specs = env[:gem_helper].with_environment do
|
||||
|
|
|
@ -32,11 +32,11 @@ module VagrantPlugins
|
|||
save!
|
||||
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
|
||||
# installed gems.
|
||||
#
|
||||
# @return [Array<String>]
|
||||
# @return [Hash]
|
||||
def installed_plugins
|
||||
@data["installed"]
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue