From c3e2ab1c1e8ef4d34ea66a64ca2a8b52a9067915 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Sun, 22 Feb 2015 13:18:53 -0600 Subject: remove unneeded get_modules_list function --- src/rebar_app_utils.erl | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/src/rebar_app_utils.erl b/src/rebar_app_utils.erl index ef52be8..cd1124a 100644 --- a/src/rebar_app_utils.erl +++ b/src/rebar_app_utils.erl @@ -72,11 +72,12 @@ validate_application_info(AppInfo, AppDetail) -> undefined -> false; AppFile -> - case get_modules_list(AppFile, AppDetail) of - {ok, List} -> - has_all_beams(EbinDir, List); - _Error -> - ?PRV_ERROR({module_list, AppFile}) + case proplists:get_value(modules, AppDetail) of + undefined -> + ?PRV_ERROR({module_list, AppFile}); + List -> + has_all_beams(EbinDir, List) + end end. @@ -84,18 +85,6 @@ validate_application_info(AppInfo, AppDetail) -> %% Internal functions %% =================================================================== --spec get_modules_list(file:filename_all(), proplists:proplist()) -> - {ok, list()} | - {warning, Reason::term()} | - {error, Reason::term()}. -get_modules_list(AppFile, AppDetail) -> - case proplists:get_value(modules, AppDetail) of - undefined -> - {warning, {invalid_app_file, AppFile}}; - ModulesList -> - {ok, ModulesList} - end. - -spec has_all_beams(file:filename_all(), list()) -> true | providers:error(). has_all_beams(EbinDir, [Module | ModuleList]) -> BeamFile = filename:join([EbinDir, -- cgit v1.1