From c604d85ed56363ee1a0de1f28dd1db40d27ff406 Mon Sep 17 00:00:00 2001 From: Anders Date: Mon, 25 Oct 2010 13:48:17 +0100 Subject: Create ebin directory if it is missing for deps --- src/rebar_deps.erl | 8 ++++++-- 1 file 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 -- cgit v1.1