summaryrefslogtreecommitdiff
path: root/src/rebar_prv_xref.erl
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2018-10-15 11:56:57 -0400
committerGitHub <noreply@github.com>2018-10-15 11:56:57 -0400
commit7bfc8110d1736d2cbf61e19d2fc16dc8e854b460 (patch)
tree91f6606ad1083eea8e57fcc46821454180b50c94 /src/rebar_prv_xref.erl
parent86519cf743204eab1d922ca8133fbf00c66f9ee8 (diff)
parentfb6de6e0e5dc0da1c4e64c166bcb69327420cb60 (diff)
Merge pull request #1907 from ferd/refactor-env-paths
Refactor env path handling and fix some bugs related to it
Diffstat (limited to 'src/rebar_prv_xref.erl')
-rw-r--r--src/rebar_prv_xref.erl4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/rebar_prv_xref.erl b/src/rebar_prv_xref.erl
index 2405ebb..12063d5 100644
--- a/src/rebar_prv_xref.erl
+++ b/src/rebar_prv_xref.erl
@@ -36,8 +36,7 @@ init(State) ->
-spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}.
do(State) ->
- OldPath = code:get_path(),
- code:add_pathsa(rebar_state:code_paths(State, all_deps)),
+ rebar_paths:set_paths([deps], State),
XrefChecks = prepare(State),
XrefIgnores = rebar_state:get(State, xref_ignores, []),
%% Run xref checks
@@ -48,7 +47,6 @@ do(State) ->
QueryChecks = rebar_state:get(State, xref_queries, []),
QueryResults = lists:foldl(fun check_query/2, [], QueryChecks),
stopped = xref:stop(xref),
- rebar_utils:cleanup_code_path(OldPath),
case XrefResults =:= [] andalso QueryResults =:= [] of
true ->
{ok, State};