Skip to content

Commit

Permalink
Print compilation lock waiting message to stderr (#14138)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatanklosko authored Jan 2, 2025
1 parent a0fb49f commit 8e796fc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/mix/lib/mix/project.ex
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,10 @@ defmodule Mix.Project do
build_path = build_path(config)

on_taken = fn os_pid ->
Mix.shell().info("Waiting for lock on the build directory (held by process #{os_pid})")
Mix.shell().error([
IO.ANSI.reset(),
"Waiting for lock on the build directory (held by process #{os_pid})"
])
end

Mix.Sync.Lock.with_lock(build_path, fun, on_taken: on_taken)
Expand All @@ -931,7 +934,10 @@ defmodule Mix.Project do
deps_path = deps_path(config)

on_taken = fn os_pid ->
Mix.shell().info("Waiting for lock on the deps directory (held by process #{os_pid})")
Mix.shell().error([
IO.ANSI.reset(),
"Waiting for lock on the deps directory (held by process #{os_pid})"
])
end

Mix.Sync.Lock.with_lock(deps_path, fun, on_taken: on_taken)
Expand Down

0 comments on commit 8e796fc

Please sign in to comment.