summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPaweł Chmielowski <pawel@process-one.net>2022-06-24 11:36:54 +0200
committerPaweł Chmielowski <pawel@process-one.net>2022-06-24 11:36:54 +0200
commit991d52f0193e0011fb8a2894dc23c1a34dcda425 (patch)
tree7df3c5ffc2a7f7412049c7b77bc34fad9d408c35 /tools
parentDon't register listeners that failed to start in config reload (diff)
Fix error reporting in 'make options' on OTP24+
Diffstat (limited to 'tools')
-rwxr-xr-xtools/opt_types.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/opt_types.sh b/tools/opt_types.sh
index 92cd943d..71d69a5d 100755
--- a/tools/opt_types.sh
+++ b/tools/opt_types.sh
@@ -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))).