diff options
author | Tristan Sloughter <t@crashfast.com> | 2015-09-06 16:46:26 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2015-09-06 16:46:46 -0500 |
commit | 5223175c2633d2e81c4820a6e883f03d8beb92eb (patch) | |
tree | 7c86f393ffb9e9e3f82c9e80a6d5dbacdb78a72a /src/rebar_prv_clean.erl | |
parent | e1cba5a2a940a8301024fbc459fc66c7b9841419 (diff) |
support updating of per app info by hooks
Diffstat (limited to 'src/rebar_prv_clean.erl')
-rw-r--r-- | src/rebar_prv_clean.erl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/rebar_prv_clean.erl b/src/rebar_prv_clean.erl index 503291d..8bdea4d 100644 --- a/src/rebar_prv_clean.erl +++ b/src/rebar_prv_clean.erl @@ -62,13 +62,13 @@ format_error(Reason) -> %% =================================================================== clean_apps(State, Providers, Apps) -> - lists:foreach(fun(AppInfo) -> - ?INFO("Cleaning out ~s...", [rebar_app_info:name(AppInfo)]), - AppDir = rebar_app_info:dir(AppInfo), - rebar_hooks:run_all_hooks(AppDir, pre, ?PROVIDER, Providers, AppInfo, State), - rebar_erlc_compiler:clean(State, rebar_app_info:out_dir(AppInfo)), - rebar_hooks:run_all_hooks(AppDir, post, ?PROVIDER, Providers, AppInfo, State) - end, Apps). + [begin + ?INFO("Cleaning out ~s...", [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(State, rebar_app_info:out_dir(AppInfo1)), + rebar_hooks:run_all_hooks(AppDir, post, ?PROVIDER, Providers, AppInfo1, State) + end || AppInfo <- Apps]. handle_args(State) -> {Args, _} = rebar_state:command_parsed_args(State), |