fix(ctl): fix formatting when printing messages without arguments
Without passing an empty argument list to `emqx_ctl:print`, formatting instructions like `~n` are being printed literally. ``` Ignore.~nJoin the cluster successfully.~nCluster status: #{running_nodes => ['emqx@emqx-0.int.thalesmg','emqx@emqx-1.int.thalesmg', 'emqx@emqx-2.int.thalesmg','emqx@emqx-3.int.thalesmg', 'emqx@emqx-4.int.thalesmg'], stopped_nodes => []} ```
This commit is contained in:
parent
2605eac4b1
commit
01794c2d2c
|
@ -139,7 +139,7 @@ help() ->
|
|||
|
||||
-spec(print(io:format()) -> ok).
|
||||
print(Msg) ->
|
||||
io:format("~ts", [format(Msg)]).
|
||||
io:format("~ts", [format(Msg, [])]).
|
||||
|
||||
-spec(print(io:format(), [term()]) -> ok).
|
||||
print(Format, Args) ->
|
||||
|
@ -243,4 +243,3 @@ zip_cmd([X | Xs], [Y | Ys]) -> [{X, Y} | zip_cmd(Xs, Ys)];
|
|||
zip_cmd([X | Xs], []) -> [{X, ""} | zip_cmd(Xs, [])];
|
||||
zip_cmd([], [Y | Ys]) -> [{"", Y} | zip_cmd([], Ys)];
|
||||
zip_cmd([], []) -> [].
|
||||
|
||||
|
|
Loading…
Reference in New Issue