aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric <[email protected]>2012-12-30 17:59:26 -0500
committerEric <[email protected]>2012-12-30 17:59:26 -0500
commitfbf58da536939dece9a6707b7ff39e12bf377d1c (patch)
tree492ffbf08b914e8f5ae9230bbccdf02197230ce8 /src
parent306d584398696d08e3ca26d6864fa71cdcfe4012 (diff)
downloadrelx-fbf58da536939dece9a6707b7ff39e12bf377d1c.tar.gz
relx-fbf58da536939dece9a6707b7ff39e12bf377d1c.tar.bz2
relx-fbf58da536939dece9a6707b7ff39e12bf377d1c.zip
fix bug in usage of root dir in prv discover
Diffstat (limited to 'src')
-rw-r--r--src/rcl_prv_discover.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rcl_prv_discover.erl b/src/rcl_prv_discover.erl
index 0a12d24..6ff50ed 100644
--- a/src/rcl_prv_discover.erl
+++ b/src/rcl_prv_discover.erl
@@ -123,13 +123,13 @@ add_rebar_deps_dir(State, LibDirs) ->
false ->
%% Check to see if there is a rebar.config. If so then look for a deps
%% dir. If both are there then we add that to the lib dirs.
- {ok, Cwd} = file:get_cwd(),
+ Root = rcl_state:root_dir(State),
- RebarConfig = filename:join([Cwd, "rebar.config"]),
- DepsDir = filename:join([Cwd, "deps"]),
+ RebarConfig = filename:join([Root, "rebar.config"]),
+ DepsDir = filename:join([Root, "deps"]),
case filelib:is_regular(RebarConfig) andalso filelib:is_dir(DepsDir) of
true ->
- add_system_lib_dir(State, [filename:absname(Cwd) | LibDirs]);
+ add_system_lib_dir(State, [filename:absname(Root) | LibDirs]);
false ->
add_system_lib_dir(State, LibDirs)
end