Merge pull request #3293 from emyl/machine-readable-plugin-list
Add machine readable output for `vagrant plugin list` command
This commit is contained in:
commit
cc99719717
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue