From 08e7a76962189b424bbef7dce90f4fe752d880a0 Mon Sep 17 00:00:00 2001 From: Emiliano Ticci Date: Sun, 23 Mar 2014 13:09:16 +0100 Subject: [PATCH] Add machine readable output for `vagrant plugin list` command --- plugins/commands/plugin/action/list_plugins.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/commands/plugin/action/list_plugins.rb b/plugins/commands/plugin/action/list_plugins.rb index 0d234720a..b7620ab84 100644 --- a/plugins/commands/plugin/action/list_plugins.rb +++ b/plugins/commands/plugin/action/list_plugins.rb @@ -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