Skip to content

Commit d08e2bb

Browse files
author
José Valim
committed
Ensure --cover works on umbrella apps
1 parent 9bc8925 commit d08e2bb

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

lib/mix/lib/mix/tasks/test.ex

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,13 @@ defmodule Mix.Tasks.Test do
66
Mix.shell.info "Cover compiling modules ... "
77
:cover.start
88
:cover.compile_beam_directory(compile_path |> to_char_list)
9+
output = opts[:output]
910

10-
if :application.get_env(:cover, :started) != {:ok, true} do
11-
:application.set_env(:cover, :started, true)
12-
output = opts[:output]
13-
14-
fn() ->
15-
Mix.shell.info "\nGenerating cover results ... "
16-
File.mkdir_p!(output)
17-
Enum.each :cover.modules, fn(mod) ->
18-
:cover.analyse_to_file(mod, '#{output}/#{mod}.html', [:html])
19-
end
11+
fn() ->
12+
Mix.shell.info "\nGenerating cover results ... "
13+
File.mkdir_p!(output)
14+
Enum.each :cover.modules, fn(mod) ->
15+
:cover.analyse_to_file(mod, '#{output}/#{mod}.html', [:html])
2016
end
2117
end
2218
end

0 commit comments

Comments
 (0)