From fbf58da536939dece9a6707b7ff39e12bf377d1c Mon Sep 17 00:00:00 2001 From: Eric Date: Sun, 30 Dec 2012 17:59:26 -0500 Subject: fix bug in usage of root dir in prv discover --- src/rcl_prv_discover.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/rcl_prv_discover.erl') 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 -- cgit v1.2.3