diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2017-10-08 17:23:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-08 17:23:59 -0400 |
commit | 6d9037a5a4d9d6480ca061f47da62c66a5fbc16c (patch) | |
tree | 3154c1776e457f8e0155495f62c13082303522ce /src/rebar_app_info.erl | |
parent | 4f6646bb1c8900f6ecb9e92ccc4c0b39219042c8 (diff) | |
parent | c92e2682a0391eeef523ac87fb1a92f576455028 (diff) |
Merge pull request #1640 from ferd/app-src-fixes
Various fixes related to .app files
Diffstat (limited to 'src/rebar_app_info.erl')
-rw-r--r-- | src/rebar_app_info.erl | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/rebar_app_info.erl b/src/rebar_app_info.erl index 050ccc1..de497d5 100644 --- a/src/rebar_app_info.erl +++ b/src/rebar_app_info.erl @@ -311,15 +311,22 @@ app_file(AppInfo=#app_info_t{}, AppFile) -> app_details(AppInfo=#app_info_t{app_details=[]}) -> case app_file(AppInfo) of undefined -> - rebar_file_utils:try_consult(app_file_src(AppInfo)); + case rebar_config:consult_app_file(app_file_src(AppInfo)) of + [] -> []; + [{application, _Name, AppDetails}] -> AppDetails + end; AppFile -> - try - rebar_file_utils:try_consult(AppFile) + try rebar_file_utils:try_consult(AppFile) of + [] -> []; + [{application, _Name, AppDetails}] -> AppDetails catch throw:{error, {Module, Reason}} -> ?DEBUG("Warning, falling back to .app.src because of: ~ts", [Module:format_error(Reason)]), - rebar_file_utils:try_consult(app_file_src(AppInfo)) + case rebar_config:consult_app_file(app_file_src(AppInfo)) of + [] -> []; + [{application, _Name, AppDetails}] -> AppDetails + end end end; app_details(#app_info_t{app_details=AppDetails}) -> |