diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2017-07-26 16:35:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-26 16:35:31 -0400 |
commit | 330baef58fa02c8cddc31c5c373fc5bda30f11dd (patch) | |
tree | 55ead44345ea98a5e1f26e64e54134a60a84ebd1 | |
parent | aa9150b5b5e4afc547e391a9e7e7fc3bc0616da4 (diff) | |
parent | 639bd13aecd3ca9f4237790264728dabaad50db0 (diff) |
Merge pull request #1591 from MikhailKalashnikov/fix-xref-cleanup-code-path
Fix cleanup_code_path for xref compile hook
-rw-r--r-- | src/rebar_prv_xref.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rebar_prv_xref.erl b/src/rebar_prv_xref.erl index e6a074f..db0f4e4 100644 --- a/src/rebar_prv_xref.erl +++ b/src/rebar_prv_xref.erl @@ -36,6 +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)), XrefChecks = prepare(State), XrefIgnores = rebar_state:get(State, xref_ignores, []), @@ -47,7 +48,7 @@ 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(rebar_state:code_paths(State, default)), + rebar_utils:cleanup_code_path(OldPath), case XrefResults =:= [] andalso QueryResults =:= [] of true -> {ok, State}; |