aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlx_app_discovery.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rlx_app_discovery.erl')
-rw-r--r--src/rlx_app_discovery.erl11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/rlx_app_discovery.erl b/src/rlx_app_discovery.erl
index 6ac8d11..3d58185 100644
--- a/src/rlx_app_discovery.erl
+++ b/src/rlx_app_discovery.erl
@@ -118,8 +118,10 @@ resolve_app_metadata(State, LibDirs) ->
end] of
[] ->
SkipApps = rlx_state:skip_apps(State),
- AppMeta1 = [App || {ok, App} <- setup_overrides(State, AppMeta0),
- not lists:keymember(rlx_app_info:name(App), 1, SkipApps)],
+ ExcludeApps = rlx_state:exclude_apps(State),
+ AppMeta1 = [rm_exclude_apps(App, ExcludeApps) ||
+ {ok, App} <- setup_overrides(State, AppMeta0),
+ not lists:keymember(rlx_app_info:name(App), 1, SkipApps++ExcludeApps)],
ec_cmd_log:debug(rlx_state:log(State),
fun() ->
["Resolved the following OTP Applications from the system: \n",
@@ -129,6 +131,11 @@ resolve_app_metadata(State, LibDirs) ->
Errors ->
?RLX_ERROR(Errors)
end.
+%% Apps listed in {exclude_apps, [...]} must be removed from applications lists
+rm_exclude_apps(App, ExcludeApps) ->
+ ActiveApps = lists:subtract(rlx_app_info:active_deps(App), ExcludeApps),
+ LibraryApps = lists:subtract(rlx_app_info:library_deps(App), ExcludeApps),
+ rlx_app_info:library_deps(rlx_app_info:active_deps(App, ActiveApps), LibraryApps).
app_name({warning, _}) ->
undefined;