Browse Source

remove unneeded get_modules_list function

pull/169/head
Tristan Sloughter 10 years ago
parent
commit
c3e2ab1c1e
1 changed files with 6 additions and 17 deletions
  1. +6
    -17
      src/rebar_app_utils.erl

+ 6
- 17
src/rebar_app_utils.erl View File

@ -72,11 +72,12 @@ validate_application_info(AppInfo, AppDetail) ->
undefined -> undefined ->
false; false;
AppFile -> 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
end. end.
@ -84,18 +85,6 @@ validate_application_info(AppInfo, AppDetail) ->
%% Internal functions %% 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(). -spec has_all_beams(file:filename_all(), list()) -> true | providers:error().
has_all_beams(EbinDir, [Module | ModuleList]) -> has_all_beams(EbinDir, [Module | ModuleList]) ->
BeamFile = filename:join([EbinDir, BeamFile = filename:join([EbinDir,

Loading…
Cancel
Save