Skip to content

Commit 969a933

Browse files
michaelklishinmergify[bot]
authored andcommitted
rabbit_mgmt_wm_version: pass Dialyzer
rabbit:product_version/0 should not return an 'undefined'. However, a fallback to the base version is a technique we already use in 'rabbitmq-diagnostics status', so adopt the same trick. (cherry picked from commit f5a8388)
1 parent 7b5c680 commit 969a933

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

deps/rabbitmq_management/src/rabbit_mgmt_wm_version.erl

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ content_types_provided(ReqData, Context) ->
2828
{rabbit_mgmt_util:responder_map(to_json), ReqData, Context}.
2929

3030
to_json(ReqData, Context) ->
31-
Version = case rabbit:product_version() of
32-
undefined -> rabbit:base_product_version();
33-
V -> V
31+
Version = case rabbit:product_info() of
32+
#{product_version := Value} -> Value;
33+
#{product_base_version := Base} -> Base
3434
end,
3535
rabbit_mgmt_util:reply(list_to_binary(Version), ReqData, Context).
3636

0 commit comments

Comments
 (0)