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

Avoid badarg error when running get-deps before ./configure has created src/ejabberd.app (#2103)

This commit is contained in:
nosnilmot 2017-11-15 08:21:05 +00:00 committed by Paweł Chmielowski
parent 6cd3867197
commit 0c6ef98d01

View File

@ -18,7 +18,8 @@ preprocess(Config, _Dirs) ->
Val -> Val Val -> Val
end, end,
Config2 = rebar_config:set_xconf(Config, top_overrides, TopOverrides), Config2 = rebar_config:set_xconf(Config, top_overrides, TopOverrides),
Config3 = case rebar_app_utils:load_app_file(Config2, _Dirs) of try
Config3 = case rebar_app_utils:load_app_file(Config2, _Dirs) of
{ok, C, AppName, _AppData} -> {ok, C, AppName, _AppData} ->
lists:foldl(fun({Type, AppName2, Opts}, Conf1) when lists:foldl(fun({Type, AppName2, Opts}, Conf1) when
AppName2 == AppName -> AppName2 == AppName ->
@ -28,5 +29,8 @@ preprocess(Config, _Dirs) ->
end, C, TopOverrides); end, C, TopOverrides);
_ -> _ ->
Config2 Config2
end, end,
{ok, Config3, []}. {ok, Config3, []}
catch
error:badarg -> {ok, Config2, []}
end.