summaryrefslogtreecommitdiff
path: root/src/rebar_plugins.erl
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2015-05-09 12:32:55 -0400
committerFred Hebert <mononcqc@ferd.ca>2015-05-09 12:32:55 -0400
commitb904c5b57a4dbe393009da0bc6720c2a78a310e1 (patch)
tree3d083b6451b75de9cdbf1516bf76d20fbac50731 /src/rebar_plugins.erl
parent671617f03e0915a62eaf630119bae32e92112e02 (diff)
parenta41fbf6cfef9f57cd2db64526e52414948049574 (diff)
Merge pull request #407 from tsloughter/plugins2
add all plugins, not those just built, to path
Diffstat (limited to 'src/rebar_plugins.erl')
-rw-r--r--src/rebar_plugins.erl4
1 files changed, 2 insertions, 2 deletions
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);