diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2012-10-26 14:30:20 +0100 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2012-10-26 14:30:20 +0100 |
commit | e857f9ed2f1208638bf4fd504a37e62d990b2919 (patch) | |
tree | 466f72dd36ef4b386a97d90bc2fc3502d25d406c | |
parent | da82e950ea979347b67cf73ac9abe497c9068b38 (diff) | |
download | rabbitmq-server-e857f9ed2f1208638bf4fd504a37e62d990b2919.tar.gz |
remove cruft from display of missing plugins
-rw-r--r-- | src/rabbit_plugins_main.erl | 21 |
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. |