Skip to content

Commit 1dd433e

Browse files
committed
Remove els_config:consult_file/1
1 parent f3ee354 commit 1dd433e

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

apps/els_core/src/els_config.erl

+1-10
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ try_yaml(Path) ->
272272

273273
-spec try_eterm(path(), boolean()) -> {ok, map()} | {error, atom(), term()}.
274274
try_eterm(Path, TryYaml) ->
275-
case consult_file(Path) of
275+
case file:consult(Path) of
276276
{ok, Config} ->
277277
{ok, maps:from_list(Config)};
278278
{error, _} when TryYaml ->
@@ -281,15 +281,6 @@ try_eterm(Path, TryYaml) ->
281281
{error, error, Reason}
282282
end.
283283

284-
-spec consult_file(path()) -> [map()] | {ok, [term()]} | {error, term()}.
285-
consult_file(Path) ->
286-
case string:find(Path, ".yaml", trailing) of
287-
nomatch ->
288-
file:consult(Path);
289-
".yaml" ->
290-
yamerl:decode_file(Path, [{map_node_format, map}])
291-
end.
292-
293284
-spec report_missing_config() -> ok.
294285
report_missing_config() ->
295286
Msg =

0 commit comments

Comments
 (0)