Skip to content

Commit 69eb2b9

Browse files
committed
Don't show disabled plugins as pending upgrade
Since commit c0187ec the value of `running_version` is converted to_string (`nil` would become the empty string). But the formatter expected `running_version` to be `nil` if the plugin is not running. This did not match and not running/not enabled plugins were marked incorrectly as "pending upgrade to...". For example: ``` $ rabbitmq-plugins list trust -q [ ] rabbitmq_trust_store (pending upgrade to 3.13.0+51.g9145b53) $ rabbitmq-plugins list trust --formatter erlang -q #{status => running,format => normal, plugins => [#{enabled => not_enabled,name => rabbitmq_trust_store,running => false, version => <<"3.13.0+51.g9145b53">>,running_version => <<>>}]} ```
1 parent a07484a commit 69eb2b9

File tree

1 file changed

+1
-1
lines changed
  • deps/rabbitmq_cli/lib/rabbitmq/cli/formatters

1 file changed

+1
-1
lines changed

deps/rabbitmq_cli/lib/rabbitmq/cli/formatters/plugins.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ defmodule RabbitMQ.CLI.Formatters.Plugins do
146146
]
147147
end
148148

149-
defp augment_version(%{version: version, running_version: nil}) do
149+
defp augment_version(%{version: version, running: false}) do
150150
to_string(version)
151151
end
152152

0 commit comments

Comments
 (0)