summaryrefslogtreecommitdiff
path: root/src/rebar_prv_clean.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_prv_clean.erl')
-rw-r--r--src/rebar_prv_clean.erl10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/rebar_prv_clean.erl b/src/rebar_prv_clean.erl
index 8f31fdd..3c8a0c3 100644
--- a/src/rebar_prv_clean.erl
+++ b/src/rebar_prv_clean.erl
@@ -12,7 +12,7 @@
-include("rebar.hrl").
-define(PROVIDER, clean).
--define(DEPS, [app_discovery]).
+-define(DEPS, [app_discovery, install_deps]).
%% ===================================================================
%% Public API
@@ -44,7 +44,8 @@ do(State) ->
case All of
true ->
DepsDir = rebar_dir:deps_dir(State1),
- AllApps = rebar_app_discover:find_apps([filename:join(DepsDir, "*")], all),
+ DepsDirs = filelib:wildcard(filename:join(DepsDir, "*")),
+ AllApps = rebar_app_discover:find_apps(DepsDirs, all),
clean_apps(State1, Providers, AllApps);
false ->
ProjectApps = rebar_state:project_apps(State1),
@@ -66,11 +67,12 @@ format_error(Reason) ->
%% ===================================================================
clean_apps(State, Providers, Apps) ->
+ Compilers = rebar_state:compilers(State),
[begin
- ?INFO("Cleaning out ~s...", [rebar_app_info:name(AppInfo)]),
+ ?INFO("Cleaning out ~ts...", [rebar_app_info:name(AppInfo)]),
AppDir = rebar_app_info:dir(AppInfo),
AppInfo1 = rebar_hooks:run_all_hooks(AppDir, pre, ?PROVIDER, Providers, AppInfo, State),
- rebar_erlc_compiler:clean(AppInfo1),
+ rebar_compiler:clean(Compilers, AppInfo1),
rebar_hooks:run_all_hooks(AppDir, post, ?PROVIDER, Providers, AppInfo1, State)
end || AppInfo <- Apps].