summaryrefslogtreecommitdiff
path: root/src/rebar_prv_compile.erl
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2015-04-19 14:29:37 -0500
committerTristan Sloughter <t@crashfast.com>2015-04-19 15:15:53 -0500
commit2667dbdd0b9da867da348fe0a6b22933daebad3c (patch)
tree52800ee92f9ca48b993d438518ec251ce3edf708 /src/rebar_prv_compile.erl
parentff47ccdd0f52d889d5622ac66104a63db63aad53 (diff)
don't duplicate hooks for top level app
Diffstat (limited to 'src/rebar_prv_compile.erl')
-rw-r--r--src/rebar_prv_compile.erl11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/rebar_prv_compile.erl b/src/rebar_prv_compile.erl
index 94a1e0b..15a5164 100644
--- a/src/rebar_prv_compile.erl
+++ b/src/rebar_prv_compile.erl
@@ -43,17 +43,14 @@ do(State) ->
EmptyState = rebar_state:new(),
build_apps(EmptyState, Providers, Deps),
- %% Use the project State for building project apps
- %% Set hooks to empty so top-level hooks aren't run for each project app
- State2 = rebar_state:set(rebar_state:set(State, post_hooks, []), pre_hooks, []),
{ok, ProjectApps1} = rebar_digraph:compile_order(ProjectApps),
- ProjectApps2 = build_apps(State2, Providers, ProjectApps1),
- State3 = rebar_state:project_apps(State2, ProjectApps2),
+ ProjectApps2 = build_apps(State, Providers, ProjectApps1),
+ State2 = rebar_state:project_apps(State, ProjectApps2),
- rebar_hooks:run_all_hooks(Cwd, post, ?PROVIDER, Providers, State3),
+ rebar_hooks:run_all_hooks(Cwd, post, ?PROVIDER, Providers, State2),
- {ok, State3}.
+ {ok, State2}.
-spec format_error(any()) -> iolist().
format_error(Reason) ->