mirror of
https://github.com/correl/rebar.git
synced 2024-11-23 19:19:54 +00:00
parent
39c38b6141
commit
a8a415aed4
1 changed files with 6 additions and 1 deletions
|
@ -502,6 +502,8 @@ acc_modules([Module | Rest], Command, Config, File, Acc) ->
|
|||
%%
|
||||
plugin_modules(Config, PredirsAssoc) ->
|
||||
Modules = lists:flatten(rebar_config:get_all(Config, plugins)),
|
||||
?DEBUG("Plugins requested while processing ~s: ~p~n",
|
||||
[rebar_utils:get_cwd(), Modules]),
|
||||
plugin_modules(Config, PredirsAssoc, ulist(Modules)).
|
||||
|
||||
ulist(L) ->
|
||||
|
@ -543,6 +545,7 @@ plugin_modules(Config, PredirsAssoc, FoundModules, MissingModules) ->
|
|||
load_plugin_modules(Config, PredirsAssoc, Modules) ->
|
||||
Cwd = rebar_utils:get_cwd(),
|
||||
PluginDirs = get_all_plugin_dirs(Config, Cwd, PredirsAssoc),
|
||||
?DEBUG("Plugin dirs for ~s:~n~p~n", [Cwd, PluginDirs]),
|
||||
|
||||
%% Find relevant sources in base_dir and plugin_dir
|
||||
Erls = string:join([atom_to_list(M)++"\\.erl" || M <- Modules], "|"),
|
||||
|
@ -558,7 +561,9 @@ load_plugin_modules(Config, PredirsAssoc, Modules) ->
|
|||
{Loaded, NotLoaded}.
|
||||
|
||||
get_all_plugin_dirs(Config, Cwd, PredirsAssoc) ->
|
||||
get_plugin_dir(Config, Cwd) ++ get_base_plugin_dirs(Cwd, PredirsAssoc).
|
||||
[rebar_utils:get_cwd()]
|
||||
++ get_plugin_dir(Config, Cwd)
|
||||
++ get_base_plugin_dirs(Cwd, PredirsAssoc).
|
||||
|
||||
get_plugin_dir(Config, Cwd) ->
|
||||
case rebar_config:get_local(Config, plugin_dir, undefined) of
|
||||
|
|
Loading…
Reference in a new issue