summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2014-12-16 20:35:15 -0500
committerFred Hebert <mononcqc@ferd.ca>2014-12-16 20:35:15 -0500
commitb29631bd92a1ed2dc105e2969faed3e59905ed9f (patch)
treee6c13c84c2a24fe1f886e202084bc902c831273e
parentb5500c7301eb6017d956b041daf4001d7b6cb3ff (diff)
parent31b886e65cd443ea2ee8547fc052e1b6396b4bbd (diff)
Merge pull request #61 from tsloughter/master
don't include all */ebin dirs in code path
-rw-r--r--src/rebar_core.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl
index fa0e459..eaa546a 100644
--- a/src/rebar_core.erl
+++ b/src/rebar_core.erl
@@ -93,7 +93,14 @@ update_code_path_(Paths) ->
expand_lib_dirs([], _Root, Acc) ->
Acc;
expand_lib_dirs([Dir | Rest], Root, Acc) ->
- Apps = filelib:wildcard(filename:join([Dir, "*", "ebin"])),
+ %% The current dir should only have an ebin dir.
+ %% Other lib dirs contain app directories, so need the wildcard
+ Apps = case Dir of
+ "." ->
+ [filename:join(Dir, "ebin")];
+ _ ->
+ filelib:wildcard(filename:join([Dir, "*", "ebin"]))
+ end,
FqApps = case filename:pathtype(Dir) of
absolute -> Apps;
_ -> [filename:join([Root, A]) || A <- Apps]