From 89b57e3aa47a425a4cc49cfd7db1099cdb8e619b Mon Sep 17 00:00:00 2001 From: Bob Ippolito Date: Tue, 11 May 2010 12:33:52 -0700 Subject: when using plugin_modules, add ebin to path --- src/rebar_core.erl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/rebar_core.erl b/src/rebar_core.erl index f925d98..747a0ab 100644 --- a/src/rebar_core.erl +++ b/src/rebar_core.erl @@ -332,6 +332,12 @@ choose_module_set([{Fn, Modules} | Rest], Dir) -> %% plugin_modules(Config) -> Modules = lists:flatten(rebar_config:get_all(Config, rebar_plugins)), + plugin_modules(Config, Modules). + +plugin_modules(_Config, []) -> + {ok, []}; +plugin_modules(Config, Modules) -> + code:add_path(filename:join([rebar_utils:get_cwd(), "ebin"])), FoundModules = [M || M <- Modules, code:which(M) =/= non_existing], case (Modules =:= FoundModules) of true -> -- cgit v1.1