diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2018-10-15 11:56:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-15 11:56:57 -0400 |
commit | 7bfc8110d1736d2cbf61e19d2fc16dc8e854b460 (patch) | |
tree | 91f6606ad1083eea8e57fcc46821454180b50c94 /src/rebar_hooks.erl | |
parent | 86519cf743204eab1d922ca8133fbf00c66f9ee8 (diff) | |
parent | fb6de6e0e5dc0da1c4e64c166bcb69327420cb60 (diff) |
Merge pull request #1907 from ferd/refactor-env-paths
Refactor env path handling and fix some bugs related to it
Diffstat (limited to 'src/rebar_hooks.erl')
-rw-r--r-- | src/rebar_hooks.erl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rebar_hooks.erl b/src/rebar_hooks.erl index ec6fe31..358458e 100644 --- a/src/rebar_hooks.erl +++ b/src/rebar_hooks.erl @@ -42,8 +42,7 @@ run_provider_hooks_(Dir, Type, Command, Providers, TypeHooks, State) -> [] -> State; HookProviders -> - PluginDepsPaths = lists:usort(rebar_state:code_paths(State, all_plugin_deps)), - code:add_pathsa(PluginDepsPaths), + rebar_paths:set_paths([plugins], State), Providers1 = rebar_state:providers(State), State1 = rebar_state:providers(rebar_state:dir(State, Dir), Providers++Providers1), case rebar_core:do(HookProviders, State1) of @@ -51,7 +50,7 @@ run_provider_hooks_(Dir, Type, Command, Providers, TypeHooks, State) -> ?DEBUG(format_error({bad_provider, Type, Command, ProviderName}), []), throw(?PRV_ERROR({bad_provider, Type, Command, ProviderName})); {ok, State2} -> - rebar_utils:remove_from_code_path(PluginDepsPaths), + rebar_paths:set_paths([deps], State2), State2 end end. |