summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2015-09-05 22:52:33 -0400
committerFred Hebert <mononcqc@ferd.ca>2015-09-05 22:52:33 -0400
commit08f9b20272af05535c064edcc44bd543b6a77793 (patch)
treebd4394eefcbf45731c67e873abb8d6d3f586355c /src
parenta81357b60587ba42c7d40e94c1a3520169db8a7e (diff)
parentdc3e8d789f96972f06dff41b6c2f94ec704e16be (diff)
Merge pull request #772 from tsloughter/eunit_fix
delete and prepend code path instead of replacing, fixes #770
Diffstat (limited to 'src')
-rw-r--r--src/rebar_utils.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
index 564b384..a90a18b 100644
--- a/src/rebar_utils.erl
+++ b/src/rebar_utils.erl
@@ -651,7 +651,12 @@ update_code(Paths) ->
code:add_patha(Path),
ok;
{ok, Modules} ->
- code:replace_path(App, Path),
+ %% replace_path causes problems when running
+ %% tests in projects like erlware_commons that rebar3
+ %% also includes
+ %code:replace_path(App, Path),
+ code:del_path(App),
+ code:add_patha(Path),
[begin code:purge(M), code:delete(M) end || M <- Modules]
end
end, Paths).