commands/plugin/install: nitpick on style

/cc @ipwnstuff - Just nitpicking and CCing you so you can see. I dislike
the "if (val = something)" syntax so I axed that. Then I simplified
logic a bit.
This commit is contained in:
Mitchell Hashimoto 2013-08-09 11:26:39 -07:00
parent cee97bc3a0
commit 602a5ce0b4
1 changed files with 6 additions and 7 deletions

View File

@ -74,16 +74,15 @@ module VagrantPlugins
: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
post_install_message = plugin_spec.post_install_message
if post_install_message
if post_install_message.is_a?(Array)
post_install_message = post_install_message.join(" ")
end
env[:ui].info(I18n.t("vagrant.commands.plugin.post_install",
:name => plugin_spec.name,
:message => post_install_message))
:message => post_install_message.to_s))
end
# Continue