summaryrefslogtreecommitdiff
path: root/src/rebar_plugins.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_plugins.erl')
-rw-r--r--src/rebar_plugins.erl10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/rebar_plugins.erl b/src/rebar_plugins.erl
index 1877751..b6bf39b 100644
--- a/src/rebar_plugins.erl
+++ b/src/rebar_plugins.erl
@@ -13,19 +13,21 @@
install(State) ->
%% Set deps_dir to a different dir for plugin so they don't collide
- DepsDir = rebar_state:get(State, deps_dir, ?DEFAULT_DEPS_DIR),
+ OldDepsDir = rebar_state:get(State, deps_dir, ?DEFAULT_DEPS_DIR),
State1 = rebar_state:set(State, deps_dir, ?DEFAULT_PLUGINS_DIR),
- expand_plugins(?DEFAULT_PLUGINS_DIR),
+ DepsDir = rebar_utils:deps_dir(State1),
+ expand_plugins(DepsDir),
Plugins = rebar_state:get(State1, plugins, []),
PluginProviders = rebar_utils:filtermap(fun(Plugin) ->
handle_plugin(Plugin, State1)
end, Plugins),
- {ok, PluginProviders, rebar_state:set(State1, deps_dir, DepsDir)}.
+ State2 = rebar_state:set(State1, deps_dir, OldDepsDir),
+ {ok, PluginProviders, State2}.
handle_plugin(Plugin, State) ->
try
- {ok, State1} = rebar_prv_install_deps:handle_deps(State, [Plugin]),
+ {ok, _, State1} = rebar_prv_install_deps:handle_deps(State, [Plugin]),
Apps = rebar_state:all_deps(State1),
ToBuild = lists:dropwhile(fun rebar_app_info:valid/1, Apps),
lists:foreach(fun(AppInfo) ->