From f23c5ebc46130489fbe928bc3ccf5f5229aac7dd Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 23 Oct 2014 12:00:46 -0700 Subject: [PATCH] commands/plugin: list puts plugin namein machine readable output [GH-4506] --- CHANGELOG.md | 2 ++ plugins/commands/plugin/action/list_plugins.rb | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28c82987c..be5e12d6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ IMPROVEMENTS: - core: `has_plugin?` function now takes a second argument which is a version constraint requirement. [GH-4650] + - commands/plugin: Plugin list machine-readable output contains the plugin + name as the target for versions and other info. [GH-4506] - guests/arch: Support predictable network interface naming. [GH-4468] - guests/suse: Support NFS client install, rsync setup. [GH-4492] - guests/tinycore: Support changing host names. [GH-4469] diff --git a/plugins/commands/plugin/action/list_plugins.rb b/plugins/commands/plugin/action/list_plugins.rb index b7620ab84..37b168867 100644 --- a/plugins/commands/plugin/action/list_plugins.rb +++ b/plugins/commands/plugin/action/list_plugins.rb @@ -34,20 +34,29 @@ module VagrantPlugins 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}") + env[:ui].machine( + "plugin-version", + "#{spec.version}#{system}", + target: spec.name) 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"]) + env[:ui].machine( + "plugin-version-constraint", + plugin["gem_version"], + target: spec.name) 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"]) + env[:ui].machine( + "plugin-custom-entrypoint", + plugin["require"], + target: spec.name) end end