summaryrefslogtreecommitdiff
path: root/src/rebar_utils.erl
diff options
context:
space:
mode:
authorAlexey Romanov <alexey.v.romanov@gmail.com>2011-03-05 14:11:31 +0300
committerAlexey Romanov <alexey.v.romanov@gmail.com>2011-03-05 14:11:31 +0300
commit7c40d624dc344e534c7b576341463648091f56e8 (patch)
tree4b384980bd6fe327cdecf25c55a6dd2622cd8412 /src/rebar_utils.erl
parent48d23b90acb688a68354b20a1b19fa0aa0e592be (diff)
parent25c0226ab94560c5e182944c4c71b9f71ac3f08e (diff)
Merge commit 'upstream/master'
Diffstat (limited to 'src/rebar_utils.erl')
-rw-r--r--src/rebar_utils.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
index 2822c0f..8898b8a 100644
--- a/src/rebar_utils.erl
+++ b/src/rebar_utils.erl
@@ -38,7 +38,8 @@
abort/2,
escript_foldl/3,
find_executable/1,
- prop_check/3]).
+ prop_check/3,
+ expand_code_path/0]).
-include("rebar.hrl").
@@ -156,6 +157,14 @@ find_executable(Name) ->
prop_check(true, _, _) -> true;
prop_check(false, Msg, Args) -> ?ABORT(Msg, Args).
+%% Convert all the entries in the code path to absolute paths.
+expand_code_path() ->
+ CodePath = lists:foldl(fun (Path, Acc) ->
+ [filename:absname(Path) | Acc]
+ end, [], code:get_path()),
+ code:set_path(lists:reverse(CodePath)).
+
+
%% ====================================================================
%% Internal functions
%% ====================================================================