diff --git a/apps/els_core/src/els_config.erl b/apps/els_core/src/els_config.erl index 2c2cc5903..9f64e3943 100644 --- a/apps/els_core/src/els_config.erl +++ b/apps/els_core/src/els_config.erl @@ -272,7 +272,7 @@ try_yaml(Path) -> -spec try_eterm(path(), boolean()) -> {ok, map()} | {error, atom(), term()}. try_eterm(Path, TryYaml) -> - case consult_file(Path) of + case file:consult(Path) of {ok, Config} -> {ok, maps:from_list(Config)}; {error, _} when TryYaml -> @@ -281,15 +281,6 @@ try_eterm(Path, TryYaml) -> {error, error, Reason} end. --spec consult_file(path()) -> [map()] | {ok, [term()]} | {error, term()}. -consult_file(Path) -> - case string:find(Path, ".yaml", trailing) of - nomatch -> - file:consult(Path); - ".yaml" -> - yamerl:decode_file(Path, [{map_node_format, map}]) - end. - -spec report_missing_config() -> ok. report_missing_config() -> Msg =