summaryrefslogtreecommitdiff
path: root/src/rebar_hooks.erl
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2015-05-29 09:50:52 -0500
committerTristan Sloughter <tristan.sloughter@gmail.com>2015-05-29 09:50:52 -0500
commita11c009fcfe02fb7741bb7ce0c8ebaf2141ffd8d (patch)
tree46780e6f6e31ab9e9f4cc0b8b84659c92adf509d /src/rebar_hooks.erl
parenta9a8c6a3debc76f4e0057652f94aea0f66320ecf (diff)
parent6c6940f860139cae0b719e0e1d7f8ed37171ba59 (diff)
Merge pull request #474 from tsloughter/fix_plugin_install
fixing plugin install and paths
Diffstat (limited to 'src/rebar_hooks.erl')
-rw-r--r--src/rebar_hooks.erl10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/rebar_hooks.erl b/src/rebar_hooks.erl
index e144a8e..4ec46f7 100644
--- a/src/rebar_hooks.erl
+++ b/src/rebar_hooks.erl
@@ -10,11 +10,17 @@ run_all_hooks(Dir, Type, Command, Providers, State) ->
run_hooks(Dir, Type, Command, State).
run_provider_hooks(Dir, Type, Command, Providers, State) ->
- State1 = rebar_state:providers(rebar_state:dir(State, Dir), Providers),
+ PluginDepsPaths = rebar_state:code_paths(State, all_plugin_deps),
+ code:add_pathsa(PluginDepsPaths),
+ Providers1 = rebar_state:providers(State),
+ State1 = rebar_state:providers(rebar_state:dir(State, Dir), Providers++Providers1),
AllHooks = rebar_state:get(State1, provider_hooks, []),
TypeHooks = proplists:get_value(Type, AllHooks, []),
HookProviders = proplists:get_all_values(Command, TypeHooks),
- rebar_core:do(HookProviders, State1).
+
+ State2 = rebar_core:do(HookProviders, State1),
+ rebar_utils:remove_from_code_path(PluginDepsPaths),
+ State2.
run_hooks(Dir, Type, Command, State) ->
Hooks = case Type of