diff options
author | Tim Watson <tim@rabbitmq.com> | 2012-05-28 13:46:32 +0100 |
---|---|---|
committer | Tim Watson <tim@rabbitmq.com> | 2012-05-28 13:46:32 +0100 |
commit | 64dbee37e5377532c68f14ac28913aaea0902fb7 (patch) | |
tree | 77aa156364aa2ee6866f5550567c1dd090acda1f /src/rabbit_plugins_main.erl | |
parent | dacdf4e3616d49f3091c1f2831ca38cb64452d79 (diff) | |
download | rabbitmq-server-64dbee37e5377532c68f14ac28913aaea0902fb7.tar.gz |
cosmetic
Diffstat (limited to 'src/rabbit_plugins_main.erl')
-rw-r--r-- | src/rabbit_plugins_main.erl | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/rabbit_plugins_main.erl b/src/rabbit_plugins_main.erl index dbca391c..572cf150 100644 --- a/src/rabbit_plugins_main.erl +++ b/src/rabbit_plugins_main.erl @@ -104,7 +104,8 @@ action(enable, ToEnable0, _Opts, PluginsFile, PluginsDir) -> end, AllPlugins = rabbit_plugins:list(PluginsDir), Enabled = rabbit_plugins:read_enabled(PluginsFile), - ImplicitlyEnabled = rabbit_plugins:dependencies(false, Enabled, AllPlugins), + ImplicitlyEnabled = rabbit_plugins:dependencies(false, + Enabled, AllPlugins), ToEnable = [list_to_atom(Name) || Name <- ToEnable0], Missing = ToEnable -- plugin_names(AllPlugins), case Missing of @@ -115,7 +116,8 @@ action(enable, ToEnable0, _Opts, PluginsFile, PluginsDir) -> end, NewEnabled = lists:usort(Enabled ++ ToEnable), write_enabled_plugins(PluginsFile, NewEnabled), - NewImplicitlyEnabled = rabbit_plugins:dependencies(false, NewEnabled, AllPlugins), + NewImplicitlyEnabled = rabbit_plugins:dependencies(false, + NewEnabled, AllPlugins), maybe_warn_mochiweb(NewImplicitlyEnabled), case NewEnabled -- ImplicitlyEnabled of [] -> io:format("Plugin configuration unchanged.~n"); @@ -145,7 +147,8 @@ action(disable, ToDisable0, _Opts, PluginsFile, PluginsDir) -> false -> ImplicitlyEnabled = rabbit_plugins:dependencies(false, Enabled, AllPlugins), NewImplicitlyEnabled = - rabbit_plugins:dependencies(false, NewEnabled, AllPlugins), + rabbit_plugins:dependencies(false, + NewEnabled, AllPlugins), print_list("The following plugins have been disabled:", ImplicitlyEnabled -- NewImplicitlyEnabled), write_enabled_plugins(PluginsFile, NewEnabled), @@ -178,14 +181,15 @@ format_plugins(Pattern, Opts, PluginsFile, PluginsDir) -> AvailablePlugins = rabbit_plugins:list(PluginsDir), EnabledExplicitly = rabbit_plugins:read_enabled(PluginsFile), EnabledImplicitly = - rabbit_plugins:dependencies(false, EnabledExplicitly, AvailablePlugins) -- - EnabledExplicitly, + rabbit_plugins:dependencies(false, EnabledExplicitly, + AvailablePlugins) -- EnabledExplicitly, {ok, RE} = re:compile(Pattern), Plugins = [ Plugin || Plugin = #plugin{name = Name} <- AvailablePlugins, re:run(atom_to_list(Name), RE, [{capture, none}]) =:= match, if OnlyEnabled -> lists:member(Name, EnabledExplicitly); - OnlyEnabledAll -> (lists:member(Name, EnabledExplicitly) or + OnlyEnabledAll -> (lists:member(Name, + EnabledExplicitly) or lists:member(Name, EnabledImplicitly)); true -> true end], |