summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnders <andersk84@gmail.com>2010-10-25 13:48:17 +0100
committerDave Smith <dizzyd@dizzyd.com>2010-11-09 20:19:38 -0700
commitc604d85ed56363ee1a0de1f28dd1db40d27ff406 (patch)
tree1cc3039ac573ea40dae90b992dea37348920dfc3 /src
parent5158f9531dadd7dca21d8e9e369bfd23ec93fc2a (diff)
Create ebin directory if it is missing for deps
Diffstat (limited to 'src')
-rw-r--r--src/rebar_deps.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
index fcc1436..74c425f 100644
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@ -155,7 +155,9 @@ update_deps_code_path([]) ->
update_deps_code_path([Dep | Rest]) ->
case is_app_available(Dep#dep.app, Dep#dep.vsn_regex, Dep#dep.dir) of
{true, _} ->
- true = code:add_patha(filename:join(Dep#dep.dir, "ebin"));
+ Dir = filename:join(Dep#dep.dir, "ebin"),
+ ok = filelib:ensure_dir(filename:join(Dir, "dummy")),
+ true = code:add_patha(Dir);
false ->
true
end,
@@ -249,9 +251,11 @@ use_source(Dep, Count) ->
%% Already downloaded -- verify the versioning matches up with our regex
case is_app_available(Dep#dep.app, Dep#dep.vsn_regex, Dep#dep.dir) of
{true, _} ->
+ Dir = filename:join(Dep#dep.dir, "ebin"),
+ ok = filelib:ensure_dir(filename:join(Dir, "dummy")),
%% Available version matches up -- we're good to go;
%% add the app dir to our code path
- true = code:add_patha(filename:join(Dep#dep.dir, "ebin")),
+ true = code:add_patha(Dir),
Dep;
false ->
%% The app that was downloaded doesn't match up (or had