diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2017-02-27 10:33:09 +0100 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2017-02-27 10:33:09 +0100 |
| commit | f56ebf7325357cd817d970992c5d6b3cbf597c41 (patch) | |
| tree | 4f425b7bee7d8efb75a8c083ef9700580cbba5fb /src | |
| parent | b261c8bf823dbada19e91efcbefd742e47e2a7cf (diff) | |
| download | rabbitmq-server-git-f56ebf7325357cd817d970992c5d6b3cbf597c41.tar.gz | |
rabbit, rabbit_cli: Use rabbit_misc:lists_droplast()
... instead of lists:droplast() directly. The latter was added to Erlang
17.0 but we need to support Erlang R16B03.
[#140575489]
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit.erl | 2 | ||||
| -rw-r--r-- | src/rabbit_cli.erl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index 9e6bcc3940..46c40e385c 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -467,7 +467,7 @@ start_apps(Apps) -> prompt -> IoDevice = get_input_iodevice(), io:setopts(IoDevice, [{echo, false}]), - PP = lists:droplast(io:get_line(IoDevice, + PP = rabbit_misc:lists_droplast(io:get_line(IoDevice, "\nPlease enter the passphrase to unlock encrypted " "configuration entries.\n\nPassphrase: ")), io:setopts(IoDevice, [{echo, true}]), diff --git a/src/rabbit_cli.erl b/src/rabbit_cli.erl index 1feda43b6e..fb4ce328ee 100644 --- a/src/rabbit_cli.erl +++ b/src/rabbit_cli.erl @@ -277,7 +277,7 @@ mutually_exclusive_flags(CurrentOptionValues, Default, FlagsAndValues) -> {ok, Value}; _ -> Names = [ [$', N, $'] || {N, _} <- PresentFlags ], - CommaSeparated = string:join(lists:droplast(Names), ", "), + CommaSeparated = string:join(rabbit_misc:lists_droplast(Names), ", "), AndOneMore = lists:last(Names), Msg = io_lib:format("Options ~s and ~s are mutually exclusive", [CommaSeparated, AndOneMore]), {error, lists:flatten(Msg)} |
