summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2012-10-26 14:30:20 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2012-10-26 14:30:20 +0100
commite857f9ed2f1208638bf4fd504a37e62d990b2919 (patch)
tree466f72dd36ef4b386a97d90bc2fc3502d25d406c
parentda82e950ea979347b67cf73ac9abe497c9068b38 (diff)
downloadrabbitmq-server-e857f9ed2f1208638bf4fd504a37e62d990b2919.tar.gz
remove cruft from display of missing plugins
-rw-r--r--src/rabbit_plugins_main.erl21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/rabbit_plugins_main.erl b/src/rabbit_plugins_main.erl
index 50c49229..33092f39 100644
--- a/src/rabbit_plugins_main.erl
+++ b/src/rabbit_plugins_main.erl
@@ -186,7 +186,7 @@ format_plugins(Pattern, Opts, PluginsFile, PluginsDir) ->
EnabledImplicitly =
rabbit_plugins:dependencies(false, EnabledExplicitly,
AvailablePlugins) -- EnabledExplicitly,
- Missing = [#plugin{name = Name} ||
+ Missing = [#plugin{name = Name, dependencies = []} ||
Name <- ((EnabledExplicitly ++ EnabledImplicitly) --
plugin_names(AvailablePlugins))],
{ok, RE} = re:compile(Pattern),
@@ -220,15 +220,26 @@ format_plugin(#plugin{name = Name, version = Version,
end,
case Format of
minimal -> io:format("~s~n", [Name]);
- normal -> io:format("~s ~-" ++ integer_to_list(MaxWidth) ++
- "w ~s~n", [Glyph, Name, Version]);
+ normal -> io:format("~s ~-" ++ integer_to_list(MaxWidth) ++ "w ~s~n",
+ [Glyph, Name, case Version of
+ undefined -> "";
+ _ -> Version
+ end]);
verbose -> io:format("~s ~w~n", [Glyph, Name]),
- io:format(" Version: \t~s~n", [Version]),
+ case Version of
+ undefined -> ok;
+ _ -> io:format(" Version: \t~s~n",
+ [Version])
+ end,
case Deps of
[] -> ok;
_ -> io:format(" Dependencies:\t~p~n", [Deps])
end,
- io:format(" Description:\t~s~n", [Description]),
+ case Description of
+ undefined -> ok;
+ _ -> io:format(" Description:\t~s~n",
+ [Description])
+ end,
io:format("~n")
end.