summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2015-02-22 13:18:53 -0600
committerTristan Sloughter <t@crashfast.com>2015-02-22 13:18:53 -0600
commitc3e2ab1c1e8ef4d34ea66a64ca2a8b52a9067915 (patch)
treea57d5759ee001747197d837801c422376fddfadc
parent8f03afded4dbb046bacb241bd66a603dee4a3e40 (diff)
remove unneeded get_modules_list function
-rw-r--r--src/rebar_app_utils.erl23
1 files 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,