From 498ec5d3ae91e0658fc61ec44de31e125ecaabe5 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Sat, 9 May 2015 10:40:45 -0500 Subject: add all plugins, not those just built, to path --- src/rebar_plugins.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/rebar_plugins.erl b/src/rebar_plugins.erl index 02e8f4e..c16223e 100644 --- a/src/rebar_plugins.erl +++ b/src/rebar_plugins.erl @@ -42,6 +42,7 @@ handle_plugin(Plugin, State) -> Apps = rebar_state:all_deps(State2), ToBuild = lists:dropwhile(fun rebar_app_info:valid/1, Apps), [build_plugin(AppInfo) || AppInfo <- ToBuild], + [true = code:add_patha(filename:join(rebar_app_info:dir(AppInfo), "ebin")) || AppInfo <- Apps], plugin_providers(Plugin) catch C:T -> @@ -54,8 +55,7 @@ build_plugin(AppInfo) -> AppDir = rebar_app_info:dir(AppInfo), C = rebar_config:consult(AppDir), S = rebar_state:new(rebar_state:new(), C, AppDir), - rebar_prv_compile:compile(S, AppInfo), - true = code:add_patha(filename:join(AppDir, "ebin")). + rebar_prv_compile:compile(S, AppInfo). plugin_providers({Plugin, _, _}) when is_atom(Plugin) -> validate_plugin(Plugin); -- cgit v1.1