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
1 changed files with 7 additions and 3 deletions

View File

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