Przeglądaj źródła

Merge pull request #1164 from snaiper80/fix_cover_compile_error

Fix compile error case when cover compilation
pull/978/merge
alisdair sullivan 9 lat temu
rodzic
commit
e6d64858c5
1 zmienionych plików z 4 dodań i 1 usunięć
  1. +4
    -1
      src/rebar_prv_cover.erl

+ 4
- 1
src/rebar_prv_cover.erl Wyświetl plik

@ -298,6 +298,7 @@ cover_compile(State, apps) ->
AppDirs = app_dirs(Apps), AppDirs = app_dirs(Apps),
cover_compile(State, lists:filter(fun(D) -> ec_file:is_dir(D) end, AppDirs)); cover_compile(State, lists:filter(fun(D) -> ec_file:is_dir(D) end, AppDirs));
cover_compile(State, Dirs) -> cover_compile(State, Dirs) ->
rebar_utils:update_code(rebar_state:code_paths(State, all_deps), [soft_purge]),
%% start the cover server if necessary %% start the cover server if necessary
{ok, CoverPid} = start_cover(), {ok, CoverPid} = start_cover(),
%% redirect cover output %% redirect cover output
@ -315,7 +316,9 @@ cover_compile(State, Dirs) ->
%% print any warnings about modules that failed to cover compile %% print any warnings about modules that failed to cover compile
lists:foreach(fun print_cover_warnings/1, lists:flatten(Results)) lists:foreach(fun print_cover_warnings/1, lists:flatten(Results))
end end
end, Dirs).
end, Dirs),
rebar_utils:cleanup_code_path(rebar_state:code_paths(State, default)),
ok.
app_dirs(Apps) -> app_dirs(Apps) ->
lists:foldl(fun app_ebin_dirs/2, [], Apps). lists:foldl(fun app_ebin_dirs/2, [], Apps).

Ładowanie…
Anuluj
Zapisz