summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 0c47525..3b117e9 100644
--- a/src/rebar_plugins.erl
+++ b/src/rebar_plugins.erl
@@ -29,11 +29,13 @@ handle_plugin(Plugin, State) ->
Apps = rebar_state:get(State1, all_deps, []),
ToBuild = lists:dropwhile(fun rebar_app_info:valid/1, Apps),
lists:foreach(fun(AppInfo) ->
- C = rebar_config:consult(rebar_app_info:dir(AppInfo)),
- S = rebar_state:new(rebar_state:new(), C, rebar_app_info:dir(AppInfo)),
- rebar_prv_compile:build(S, AppInfo)
+ AppDir = rebar_app_info:dir(AppInfo),
+ C = rebar_config:consult(AppDir),
+ S = rebar_state:new(rebar_state:new(), C, AppDir),
+ rebar_prv_compile:build(S, AppInfo),
+ true = code:add_patha(filename:join(AppDir, "ebin"))
end, ToBuild),
- expand_plugins(?DEFAULT_PLUGINS_DIR),
+
plugin_providers(Plugin)
catch
C:T ->