summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2015-09-02 22:43:43 -0500
committerTristan Sloughter <t@crashfast.com>2015-09-02 22:43:43 -0500
commitdc3e8d789f96972f06dff41b6c2f94ec704e16be (patch)
tree18bdb048ea3c4e82b9d8cd92494fa36d459da051 /src
parente385c19168aadf043adadfb3ea0bb314113d845c (diff)
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 02a2262..9761a24 100644
--- a/src/rebar_utils.erl
+++ b/src/rebar_utils.erl
@@ -684,7 +684,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).