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,7 +18,8 @@ preprocess(Config, _Dirs) ->
Val -> Val
end,
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} ->
lists:foldl(fun({Type, AppName2, Opts}, Conf1) when
AppName2 == AppName ->
@ -28,5 +29,8 @@ preprocess(Config, _Dirs) ->
end, C, TopOverrides);
_ ->
Config2
end,
{ok, Config3, []}.
end,
{ok, Config3, []}
catch
error:badarg -> {ok, Config2, []}
end.