summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralisdair sullivan <alisdairsullivan@yahoo.ca>2016-06-06 17:26:26 -0700
committeralisdair sullivan <alisdairsullivan@yahoo.ca>2016-06-06 17:26:26 -0700
commite6d64858c5b6f951d20975f150b45ebdc401da2e (patch)
tree9253cf96ebac2a51338e9f1a8f4c3ea53dc4d9dd
parentcfa0a7e40970a4cfe7d761dd876fd04bf0fd13d0 (diff)
parentb9d43cd8cd1771bdbedac0875cda920c68ee1e7f (diff)
Merge pull request #1164 from snaiper80/fix_cover_compile_error
Fix compile error case when cover compilation
-rw-r--r--src/rebar_prv_cover.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rebar_prv_cover.erl b/src/rebar_prv_cover.erl
index e555a9b..464967b 100644
--- a/src/rebar_prv_cover.erl
+++ b/src/rebar_prv_cover.erl
@@ -298,6 +298,7 @@ cover_compile(State, apps) ->
AppDirs = app_dirs(Apps),
cover_compile(State, lists:filter(fun(D) -> ec_file:is_dir(D) end, AppDirs));
cover_compile(State, Dirs) ->
+ rebar_utils:update_code(rebar_state:code_paths(State, all_deps), [soft_purge]),
%% start the cover server if necessary
{ok, CoverPid} = start_cover(),
%% redirect cover output
@@ -315,7 +316,9 @@ cover_compile(State, Dirs) ->
%% print any warnings about modules that failed to cover compile
lists:foreach(fun print_cover_warnings/1, lists:flatten(Results))
end
- end, Dirs).
+ end, Dirs),
+ rebar_utils:cleanup_code_path(rebar_state:code_paths(State, default)),
+ ok.
app_dirs(Apps) ->
lists:foldl(fun app_ebin_dirs/2, [], Apps).