summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2011-02-21 17:42:10 +0100
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2011-02-21 17:42:10 +0100
commit3356c2d9e87c9bbad082bd3eeccecea0b6cc4358 (patch)
tree13e5fd9ab5f475e6bd1999edc8a65f619f1975e9
parentc6f6e8a572fe4760aaa9d36d77ab2b9209534054 (diff)
Use erlang:function_exported/3
-rw-r--r--src/rebar_core.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl
index db3e0b4..b390dc0 100644
--- a/src/rebar_core.erl
+++ b/src/rebar_core.erl
@@ -280,8 +280,8 @@ expand_lib_dirs([Dir | Rest], Root, Acc) ->
select_modules([], _Command, Acc) ->
lists:reverse(Acc);
select_modules([Module | Rest], Command, Acc) ->
- Exports = Module:module_info(exports),
- case lists:member({Command, 2}, Exports) of
+ {module, Module} = code:ensure_loaded(Module),
+ case erlang:function_exported(Module, Command, 2) of
true ->
select_modules(Rest, Command, [Module | Acc]);
false ->