diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2011-10-11 14:25:10 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2011-10-11 14:25:10 +0100 |
| commit | ff083c90f67eebf0817c720e0129ee32e969b4d3 (patch) | |
| tree | a154610dad7f62683f5128b8957b0e0dfbbb1ef7 | |
| parent | 378a659529d8d58671997af3bb94707a7936e430 (diff) | |
| download | rabbitmq-server-git-ff083c90f67eebf0817c720e0129ee32e969b4d3.tar.gz | |
If the user specifies the name of a non-existent plugin to disable, then we should actually disable it if it's enabled - otherwise we can never remove non-existent plugins from the enabled_plugins file.
| -rw-r--r-- | src/rabbit_plugins.erl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rabbit_plugins.erl b/src/rabbit_plugins.erl index 2e005d5ff0..763657e2b4 100644 --- a/src/rabbit_plugins.erl +++ b/src/rabbit_plugins.erl @@ -127,9 +127,8 @@ action(disable, ToDisable0, _Opts, PluginsFile, PluginsDir) -> _ -> print_list("Warning: the following plugins could not be found:", Missing) end, - ToDisable1 = ToDisable -- Missing, - ToDisable2 = calculate_dependencies(true, ToDisable1, AllPlugins), - NewEnabled = Enabled -- ToDisable2, + ToDisableDeps = calculate_dependencies(true, ToDisable, AllPlugins), + NewEnabled = Enabled -- ToDisableDeps, case length(Enabled) =:= length(NewEnabled) of true -> io:format("Plugin configuration unchanged.~n"); false -> ImplicitlyEnabled = |
