Skip to content

Commit a056f0a

Browse files
author
José Valim
committed
Projects without a mix.exs can't be recursive
Otherwise, recursive_enabled? always returns true, even when it should be disabled, affecting the output of tasks. Closes #1374
1 parent b830485 commit a056f0a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

lib/mix/lib/mix/server.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ defmodule Mix.Server do
8585
[ Project[rec_enabled?: bool] | _ ] ->
8686
{ :reply, bool, config }
8787
_ ->
88-
{ :reply, true, config }
88+
{ :reply, false, config }
8989
end
9090
end
9191

lib/mix/test/mix/tasks/compile_test.exs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ defmodule Mix.Tasks.CompileTest do
3939
Mix.Project.pop
4040
end
4141

42+
test "compile is no-op on empty project" do
43+
in_fixture "beams", fn ->
44+
Mix.Tasks.Compile.run []
45+
refute File.exists?("ebin")
46+
end
47+
end
48+
4249
test "compile a project without mixfile" do
4350
in_fixture "no_mixfile", fn ->
4451
Mix.Tasks.Compile.run []

0 commit comments

Comments
 (0)