9339c89dc5
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
25 lines
972 B
Diff
25 lines
972 B
Diff
From: Peter Lemenkov <lemenkov@gmail.com>
|
|
Date: Sat, 2 Mar 2013 10:39:15 +0400
|
|
Subject: [PATCH] Check system-wide libdir in case of source-based dependency
|
|
|
|
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
|
|
|
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
|
|
index a6e5b27..ba2b4e8 100644
|
|
--- a/src/rebar_deps.erl
|
|
+++ b/src/rebar_deps.erl
|
|
@@ -393,7 +393,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}};
|