From ee1214a9a816740188914aaa0ceae3e8719f145f Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Sat, 8 Nov 2014 10:12:32 -0600 Subject: add plugin and its deps to path as they are built --- src/rebar_plugins.erl | 10 ++++++---- 1 file 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 -> -- cgit v1.1