From 13fd63738960c567d32df3061a2a4e5452dac0e1 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sat, 2 Mar 2013 10:39:15 +0400 Subject: [PATCH 06/10] Check system-wide libdir in case of source-based dependency Signed-off-by: Peter Lemenkov --- src/rebar_deps.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl index 074e929..9cc82f7 100644 --- a/src/rebar_deps.erl +++ b/src/rebar_deps.erl @@ -305,7 +305,12 @@ find_dep(Config, Dep, _Source) -> %% _Source is defined. Regardless of what it is, we must find it %% locally satisfied or fetch it from the original source %% into the project's deps - find_dep_in_dir(Config, Dep, get_deps_dir(Config, Dep#dep.app)). + case find_dep_in_dir(Config, Dep, get_deps_dir(Config, Dep#dep.app)) of + {_Config1, {avail, _Dir}} = Avail -> + Avail; + {Config1, {missing, _}} -> + find_dep_in_dir(Config1, Dep, get_lib_dir(Dep#dep.app)) + end. find_dep_in_dir(Config, _Dep, {false, Dir}) -> {Config, {missing, Dir}}; -- 1.8.1.4