summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@plataformatec.com.br>2018-07-12 00:05:54 +0200
committerJosé Valim <jose.valim@plataformatec.com.br>2018-07-12 00:06:08 +0200
commit61d42c2a555417de2cfbccaaad0acd26b5fc1210 (patch)
treeb4ce2743d89d320015d311921fca661c3c86e4e0
parent24c6974667d3396f62007d95aecf5bca8ee8ea07 (diff)
downloadelixir-61d42c2a555417de2cfbccaaad0acd26b5fc1210.tar.gz
Properly guard in_project arguments
Closes #7741
-rw-r--r--lib/mix/lib/mix/project.ex4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mix/lib/mix/project.ex b/lib/mix/lib/mix/project.ex
index f6e784fbb..bc87c3fd5 100644
--- a/lib/mix/lib/mix/project.ex
+++ b/lib/mix/lib/mix/project.ex
@@ -334,7 +334,7 @@ defmodule Mix.Project do
@spec in_project(atom, Path.t(), keyword, (module -> result)) :: result when result: term
def in_project(app, path, post_config \\ [], fun)
- def in_project(app, ".", post_config, fun) do
+ def in_project(app, ".", post_config, fun) when is_atom(app) do
cached =
try do
load_project(app, post_config)
@@ -351,7 +351,7 @@ defmodule Mix.Project do
end
end
- def in_project(app, path, post_config, fun) do
+ def in_project(app, path, post_config, fun) when is_atom(app) do
File.cd!(path, fn ->
in_project(app, ".", post_config, fun)
end)