Skip to content

Commit 75e2270

Browse files
author
José Valim
committed
Share _build path when running commands from umbrella
1 parent eac9929 commit 75e2270

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/mix/lib/mix/task.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,9 @@ defmodule Mix.Task do
211211
recursive = recursive(module)
212212

213213
if umbrella? && recursive && Mix.ProjectStack.enable_recursion do
214+
config = [build_path: Mix.Project.build_path]
214215
res = lc Mix.Dep[app: app, opts: opts] inlist Mix.Deps.Umbrella.loaded do
215-
Mix.Project.in_project(app, opts[:path], fun)
216+
Mix.Project.in_project(app, opts[:path], config, fun)
216217
end
217218
Mix.ProjectStack.disable_recursion
218219
res

lib/mix/test/mix/umbrella_test.exs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@ defmodule Mix.UmbrellaTest do
146146
purge [Bar]
147147

148148
future = { { 2020, 4, 17 }, { 14, 0, 0 } }
149-
File.touch!("_build/lib/foo/.compile.elixir", future)
149+
150+
manifest = "../foo/_build/lib/foo/.compile.elixir"
151+
File.mkdir_p!(Path.dirname(manifest))
152+
File.touch!(manifest, future)
150153
assert Mix.Tasks.Compile.Elixir.run([]) == :ok
151154
end)
152155
end)

0 commit comments

Comments
 (0)