diff options
author | Tristan Sloughter <t@crashfast.com> | 2014-11-08 10:12:32 -0600 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2014-11-08 10:12:32 -0600 |
commit | ee1214a9a816740188914aaa0ceae3e8719f145f (patch) | |
tree | 4edca19530287cdc30beabf084449bd3d990c085 /src | |
parent | d8f3ea005a8901ce380affb266ae876f0f8995bc (diff) |
add plugin and its deps to path as they are built
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_plugins.erl | 10 |
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 -> |