Add machine readable output for `vagrant plugin list` command
This commit is contained in:
parent
f7adeadf8d
commit
08e7a76962
|
@ -33,17 +33,21 @@ module VagrantPlugins
|
||||||
system = ""
|
system = ""
|
||||||
system = ", system" if plugin && plugin["system"]
|
system = ", system" if plugin && plugin["system"]
|
||||||
env[:ui].info "#{spec.name} (#{spec.version}#{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"] != ""
|
if plugin["gem_version"] && plugin["gem_version"] != ""
|
||||||
env[:ui].info(I18n.t(
|
env[:ui].info(I18n.t(
|
||||||
"vagrant.commands.plugin.plugin_version",
|
"vagrant.commands.plugin.plugin_version",
|
||||||
version: plugin["gem_version"]))
|
version: plugin["gem_version"]))
|
||||||
|
env[:ui].machine("plugin-version-constraint", plugin["gem_version"])
|
||||||
end
|
end
|
||||||
|
|
||||||
if plugin["require"] && plugin["require"] != ""
|
if plugin["require"] && plugin["require"] != ""
|
||||||
env[:ui].info(I18n.t(
|
env[:ui].info(I18n.t(
|
||||||
"vagrant.commands.plugin.plugin_require",
|
"vagrant.commands.plugin.plugin_require",
|
||||||
require: plugin["require"]))
|
require: plugin["require"]))
|
||||||
|
env[:ui].machine("plugin-custom-entrypoint", plugin["require"])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue