summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rebar_edoc.erl5
-rw-r--r--src/rebar_erlydtl_compiler.erl2
-rw-r--r--src/rebar_shell.erl5
-rw-r--r--src/rebar_xref.erl2
4 files changed, 4 insertions, 10 deletions
diff --git a/src/rebar_edoc.erl b/src/rebar_edoc.erl
index a022913..c88fe62 100644
--- a/src/rebar_edoc.erl
+++ b/src/rebar_edoc.erl
@@ -87,12 +87,9 @@ setup_code_path() ->
%% and the like can work properly when generating their own
%% documentation.
CodePath = code:get_path(),
- true = code:add_patha(ebin_dir()),
+ true = code:add_patha(rebar_utils:ebin_dir()),
CodePath.
-ebin_dir() ->
- filename:join(rebar_utils:get_cwd(), "ebin").
-
newer_file_exists(Paths, LastMod) ->
CheckFile = fun(Filename, _) ->
FLast = filelib:last_modified(Filename),
diff --git a/src/rebar_erlydtl_compiler.erl b/src/rebar_erlydtl_compiler.erl
index 9c47a63..12077f2 100644
--- a/src/rebar_erlydtl_compiler.erl
+++ b/src/rebar_erlydtl_compiler.erl
@@ -83,7 +83,7 @@
compile(Config, _AppFile) ->
DtlOpts = erlydtl_opts(Config),
OrigPath = code:get_path(),
- true = code:add_path(filename:join(rebar_utils:get_cwd(), "ebin")),
+ true = code:add_path(rebar_utils:ebin_dir()),
Result = rebar_base_compiler:run(Config, [],
option(doc_root, DtlOpts),
option(source_ext, DtlOpts),
diff --git a/src/rebar_shell.erl b/src/rebar_shell.erl
index 0426f24..2dbf4a0 100644
--- a/src/rebar_shell.erl
+++ b/src/rebar_shell.erl
@@ -38,7 +38,7 @@ shell(_Config, _AppFile) ->
%% for the "top level" directory
case is_deps_dir(rebar_utils:get_cwd()) of
false ->
- true = code:add_pathz(ebin_dir()),
+ true = code:add_pathz(rebar_utils:ebin_dir()),
user_drv:start(),
%% this call never returns (until user quits shell)
shell:server(false, false);
@@ -47,9 +47,6 @@ shell(_Config, _AppFile) ->
end,
ok.
-ebin_dir() ->
- filename:join(rebar_utils:get_cwd(), "ebin").
-
is_deps_dir(Dir) ->
case lists:reverse(filename:split(Dir)) of
[_, "deps" | _] ->
diff --git a/src/rebar_xref.erl b/src/rebar_xref.erl
index 1258079..4b045a0 100644
--- a/src/rebar_xref.erl
+++ b/src/rebar_xref.erl
@@ -53,7 +53,7 @@ xref(Config, _) ->
%% Save the code path prior to doing anything
OrigPath = code:get_path(),
- true = code:add_path(filename:join(rebar_utils:get_cwd(), "ebin")),
+ true = code:add_path(rebar_utils:ebin_dir()),
%% Get list of xref checks we want to run
XrefChecks = rebar_config:get(Config, xref_checks,