Skip to content

Commit 61d42c2

Browse files
author
José Valim
committed
Properly guard in_project arguments
Closes #7741
1 parent 24c6974 commit 61d42c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/mix/lib/mix/project.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ defmodule Mix.Project do
334334
@spec in_project(atom, Path.t(), keyword, (module -> result)) :: result when result: term
335335
def in_project(app, path, post_config \\ [], fun)
336336

337-
def in_project(app, ".", post_config, fun) do
337+
def in_project(app, ".", post_config, fun) when is_atom(app) do
338338
cached =
339339
try do
340340
load_project(app, post_config)
@@ -351,7 +351,7 @@ defmodule Mix.Project do
351351
end
352352
end
353353

354-
def in_project(app, path, post_config, fun) do
354+
def in_project(app, path, post_config, fun) when is_atom(app) do
355355
File.cd!(path, fn ->
356356
in_project(app, ".", post_config, fun)
357357
end)

0 commit comments

Comments
 (0)