diff options
author | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-05-29 09:50:52 -0500 |
---|---|---|
committer | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-05-29 09:50:52 -0500 |
commit | a11c009fcfe02fb7741bb7ce0c8ebaf2141ffd8d (patch) | |
tree | 46780e6f6e31ab9e9f4cc0b8b84659c92adf509d /src/rebar_hooks.erl | |
parent | a9a8c6a3debc76f4e0057652f94aea0f66320ecf (diff) | |
parent | 6c6940f860139cae0b719e0e1d7f8ed37171ba59 (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.erl | 10 |
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 |