25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Fix error reporting in 'make options' on OTP24+

This commit is contained in:
Paweł Chmielowski 2022-06-24 11:36:54 +02:00
parent 06147deccd
commit 991d52f019

View File

@ -483,8 +483,12 @@ options_required([Form]) ->
proplists:get_value(required, Opts, []).
format_file(Path, Form) ->
Line = case erl_syntax:get_pos(Form) of
{L, _} -> L;
L -> L
end,
filename:rootname(filename:basename(Path)) ++ ".erl:" ++
integer_to_list(erl_syntax:get_pos(Form)).
integer_to_list(Line).
module(Path) ->
list_to_atom(filename:rootname(filename:basename(Path))).