Merge pull request #3293 from emyl/machine-readable-plugin-list

Add machine readable output for `vagrant plugin list` command
This commit is contained in:
Mitchell Hashimoto 2014-04-01 22:29:21 -07:00
commit cc99719717
1 changed files with 4 additions and 0 deletions

View File

@ -33,17 +33,21 @@ module VagrantPlugins
system = ""
system = ", system" if plugin && plugin["system"]
env[:ui].info "#{spec.name} (#{spec.version}#{system})"
env[:ui].machine("plugin-name", spec.name)
env[:ui].machine("plugin-version", "#{spec.version}#{system}")
if plugin["gem_version"] && plugin["gem_version"] != ""
env[:ui].info(I18n.t(
"vagrant.commands.plugin.plugin_version",
version: plugin["gem_version"]))
env[:ui].machine("plugin-version-constraint", plugin["gem_version"])
end
if plugin["require"] && plugin["require"] != ""
env[:ui].info(I18n.t(
"vagrant.commands.plugin.plugin_require",
require: plugin["require"]))
env[:ui].machine("plugin-custom-entrypoint", plugin["require"])
end
end