From 73bf5b4c055ef30089dabb3f99d09410af144b7f Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Fri, 30 Nov 2018 09:00:08 -0700 Subject: fix for mix projects that don't have app.src files (#1964) --- src/rebar_app_info.erl | 5 ++++- src/rebar_app_utils.erl | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/rebar_app_info.erl b/src/rebar_app_info.erl index 9dfe278..d051a15 100644 --- a/src/rebar_app_info.erl +++ b/src/rebar_app_info.erl @@ -343,9 +343,12 @@ app_file(AppInfo=#app_info_t{}, AppFile) -> app_details(AppInfo=#app_info_t{app_details=[]}) -> case app_file(AppInfo) of undefined -> - case rebar_config:consult_app_file(app_file_src(AppInfo)) of + try rebar_config:consult_app_file(app_file_src(AppInfo)) of [] -> []; [{application, _Name, AppDetails}] -> AppDetails + catch + _:_ -> + [] end; AppFile -> try rebar_file_utils:try_consult(AppFile) of diff --git a/src/rebar_app_utils.erl b/src/rebar_app_utils.erl index 19ed4dd..5fe5ba6 100644 --- a/src/rebar_app_utils.erl +++ b/src/rebar_app_utils.erl @@ -224,7 +224,8 @@ dep_to_app(Parent, DepsDir, Name, Vsn, Source, IsLock, State) -> {ok, AppInfo0} = case rebar_app_info:discover(Dir) of {ok, App} -> - {ok, rebar_app_info:is_available(rebar_app_info:parent(App, Parent), + App1 = rebar_app_info:name(App, Name), + {ok, rebar_app_info:is_available(rebar_app_info:parent(App1, Parent), true)}; not_found -> rebar_app_info:new(Parent, Name, Vsn, Dir, []) -- cgit v1.1