File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,9 @@ defmodule Mix.Tasks.App.Start do
28
28
# Stop the Logger after we have used it for compilation.
29
29
# It is up to the application to decide if it should be
30
30
# restarted or not.
31
- Logger.App . stop ( )
31
+ # Mix should not depend directly on Logger so check that
32
+ # it's loaded.
33
+ if Code . ensure_loaded? ( Logger ) , do: Logger.App . stop ( )
32
34
33
35
unless "--no-start" in args do
34
36
start ( Mix.Project . config [ :app ] )
Original file line number Diff line number Diff line change @@ -23,14 +23,16 @@ defmodule Mix.TaskTest do
23
23
end
24
24
25
25
test "try to compile if task is missing" do
26
- Mix.Project . push ( SampleProject , "sample" )
26
+ in_fixture "no_mixfile" , fn ->
27
+ Mix.Project . push ( SampleProject , "sample" )
27
28
28
- assert_raise Mix.NoTaskError , fn ->
29
- Mix.Task . run ( "unknown" )
30
- end
29
+ assert_raise Mix.NoTaskError , fn ->
30
+ Mix.Task . run ( "unknown" )
31
+ end
31
32
32
- # Check if compile task have run
33
- refute Mix.TasksServer . run ( { :task , "compile" , Mix.Project . get } )
33
+ # Check if compile task have run
34
+ refute Mix.TasksServer . run ( { :task , "compile" , Mix.Project . get } )
35
+ end
34
36
end
35
37
36
38
test "clear/0" do
You can’t perform that action at this time.
0 commit comments