From 2033eba2d46f0ecb755d1b0983a88d363ac7bd0d Mon Sep 17 00:00:00 2001 From: Erran Carey Date: Fri, 26 Jul 2013 00:53:53 -0500 Subject: [PATCH] Display post install messages if a plugin has any --- plugins/commands/plugin/action/install_gem.rb | 13 +++++++++++++ templates/locales/en.yml | 1 + 2 files changed, 14 insertions(+) diff --git a/plugins/commands/plugin/action/install_gem.rb b/plugins/commands/plugin/action/install_gem.rb index dba41d545..c550e74fb 100644 --- a/plugins/commands/plugin/action/install_gem.rb +++ b/plugins/commands/plugin/action/install_gem.rb @@ -60,6 +60,19 @@ module VagrantPlugins :name => plugin_spec.name, :version => plugin_spec.version.to_s)) + # If the plugin's spec includes a post-install message display it + if (post_install_message = plugin_spec.post_install_message) + post_install_message = if post_install_message.kind_of? Array + post_install_message.join(" ") + else + post_install_message.to_s + end + + env[:ui].info(I18n.t("vagrant.commands.plugin.post_install", + :name => plugin_spec.name, + :message => post_install_message)) + end + # Continue @app.call(env) end diff --git a/templates/locales/en.yml b/templates/locales/en.yml index af9091359..430af3a89 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -728,6 +728,7 @@ en: Uninstalling the '%{name}' plugin... post_install: |- Post install message from the '%{name}' plugin: + %{message} status: aborted: |-