diff options
author | Eric <[email protected]> | 2012-11-21 10:07:40 -0500 |
---|---|---|
committer | Jordan Wilberding <[email protected]> | 2012-11-21 16:44:04 -0700 |
commit | ae8298203952dd631e573668ccd5eb6655538c46 (patch) | |
tree | be749f551eb2575c7ab35dfc98662fe448c4ac1e /src/rcl_prv_discover.erl | |
parent | 89e5d70f95f4d23811500d6bf2643714f6c95fa2 (diff) | |
download | relx-ae8298203952dd631e573668ccd5eb6655538c46.tar.gz relx-ae8298203952dd631e573668ccd5eb6655538c46.tar.bz2 relx-ae8298203952dd631e573668ccd5eb6655538c46.zip |
minor cleanup and refactoring for rcl_prv_assembler, rcl_prv_discover
Signed-off-by: Jordan Wilberding <[email protected]>
Diffstat (limited to 'src/rcl_prv_discover.erl')
-rw-r--r-- | src/rcl_prv_discover.erl | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/rcl_prv_discover.erl b/src/rcl_prv_discover.erl index 23a3937..82f138b 100644 --- a/src/rcl_prv_discover.erl +++ b/src/rcl_prv_discover.erl @@ -49,7 +49,17 @@ do(State) -> ["Resolving OTP Applications from directories:\n", [[rcl_util:indent(1), LibDir, "\n"] || LibDir <- LibDirs]] end), + resolve_app_metadata(State, LibDirs, OutputDir). +-spec format_error([ErrorDetail::term()]) -> iolist(). +format_error(ErrorDetails) + when erlang:is_list(ErrorDetails) -> + [[format_detail(ErrorDetail), "\n"] || ErrorDetail <- ErrorDetails]. + +%%%=================================================================== +%%% Internal Functions +%%%=================================================================== +resolve_app_metadata(State, LibDirs, OutputDir) -> AppMeta0 = lists:flatten(ec_plists:map(fun(LibDir) -> discover_dir([OutputDir], LibDir) @@ -66,9 +76,6 @@ do(State) -> false end], - lists:filter(fun({error, _}) -> true; - (_) -> false - end, AppMeta0), case Errors of [] -> AppMeta1 = lists:flatten(AppMeta0), @@ -82,14 +89,7 @@ do(State) -> ?RCL_ERROR(Errors) end. --spec format_error([ErrorDetail::term()]) -> iolist(). -format_error(ErrorDetails) - when erlang:is_list(ErrorDetails) -> - [[format_detail(ErrorDetail), "\n"] || ErrorDetail <- ErrorDetails]. -%%%=================================================================== -%%% Internal Functions -%%%=================================================================== get_lib_dirs(State) -> LibDirs0 = rcl_state:lib_dirs(State), add_rebar_deps_dir(State, LibDirs0). |