From f13804ffab4443cb8dec1239b9fbd0904bac50a9 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Mon, 26 Jan 2015 18:54:45 -0600 Subject: use processed app file for validation --- src/rebar_app_discover.erl | 7 +++++-- src/rebar_otp_app.erl | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/rebar_app_discover.erl b/src/rebar_app_discover.erl index 9e9b8e9..4d89c0d 100644 --- a/src/rebar_app_discover.erl +++ b/src/rebar_app_discover.erl @@ -6,7 +6,8 @@ find_apps/1, find_apps/2, find_app/2, - validate_application_info/1]). + validate_application_info/1, + validate_application_info/2]). -include_lib("providers/include/providers.hrl"). @@ -140,12 +141,14 @@ create_app_info(AppDir, AppFile) -> -spec validate_application_info(rebar_app_info:t()) -> boolean(). validate_application_info(AppInfo) -> + validate_application_info(AppInfo, rebar_app_info:app_details(AppInfo)). + +validate_application_info(AppInfo, AppDetail) -> EbinDir = rebar_app_info:ebin_dir(AppInfo), case rebar_app_info:app_file(AppInfo) of undefined -> false; AppFile -> - AppDetail = rebar_app_info:app_details(AppInfo), case get_modules_list(AppFile, AppDetail) of {ok, List} -> has_all_beams(EbinDir, List); diff --git a/src/rebar_otp_app.erl b/src/rebar_otp_app.erl index 74b2988..e5e2361 100644 --- a/src/rebar_otp_app.erl +++ b/src/rebar_otp_app.erl @@ -101,7 +101,7 @@ validate_app_modules(State, App, AppData) -> AppVsn = proplists:get_value(vsn, AppData), case rebar_state:get(State, validate_app_modules, true) of true -> - case rebar_app_discover:validate_application_info(App) of + case rebar_app_discover:validate_application_info(App, AppData) of true -> {ok, rebar_app_info:original_vsn(App, AppVsn)}; Error -> -- cgit v1.1