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 | f6eb544d340162a4b6076bd2f4621a80729308c5 (patch) | |
| tree | 466f72dd36ef4b386a97d90bc2fc3502d25d406c /src | |
| parent | d72af6641100d0f3d31ad09d51598cc1da03b43e (diff) | |
| download | rabbitmq-server-git-f6eb544d340162a4b6076bd2f4621a80729308c5.tar.gz | |
remove cruft from display of missing plugins
Diffstat (limited to 'src')
| -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 50c49229cd..33092f391e 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. |
