summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerhard Lazu <gerhard@rabbitmq.com>2016-12-19 12:23:23 +0000
committerJean-Sébastien Pedron <jean-sebastien@rabbitmq.com>2016-12-19 12:23:23 +0000
commit4b23681c986269ea86e49b528e7c145b12c66280 (patch)
treeb2f220d9f8e95f52e193b3d1f9739abff950279c
parent93c876aba1184e83811dd39a32b2d17913bc3a20 (diff)
downloadrabbitmq-server-git-4b23681c986269ea86e49b528e7c145b12c66280.tar.gz
Accept list of #plugin records or atoms in maybe_keep_required_deps
Signed-off-by: Jean-Sébastien Pedron <jean-sebastien@rabbitmq.com> [#118562759]
-rw-r--r--src/rabbit_plugins.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rabbit_plugins.erl b/src/rabbit_plugins.erl
index b7ba3af732..cd062b0e3e 100644
--- a/src/rabbit_plugins.erl
+++ b/src/rabbit_plugins.erl
@@ -544,7 +544,10 @@ maybe_keep_required_deps(false, Plugins) ->
%% instance.
application:load(rabbit),
{ok, RabbitDeps} = application:get_key(rabbit, applications),
- lists:filter(fun(#plugin{name = Name}) ->
+ lists:filter(fun
+ (#plugin{name = Name}) ->
+ not lists:member(Name, RabbitDeps);
+ (Name) when is_atom(Name) ->
not lists:member(Name, RabbitDeps)
end,
Plugins).