diff --git a/apps/remote_control/lib/lexical/remote_control/mix.ex b/apps/remote_control/lib/lexical/remote_control/mix.ex index 6def5e539..63b4a042f 100644 --- a/apps/remote_control/lib/lexical/remote_control/mix.ex +++ b/apps/remote_control/lib/lexical/remote_control/mix.ex @@ -1,7 +1,6 @@ defmodule Lexical.RemoteControl.Mix do alias Lexical.Project alias Lexical.RemoteControl - alias Lexical.RemoteControl.Build def in_project(fun) do if RemoteControl.project_node?() do @@ -11,13 +10,17 @@ defmodule Lexical.RemoteControl.Mix do end end + def with_lock(fun) do + RemoteControl.with_lock(__MODULE__, fun) + end + def in_project(%Project{} = project, fun) do # Locking on the build make sure we don't get a conflict on the mix.exs being # already defined old_cwd = File.cwd!() - Build.with_lock(fn -> + with_lock(fn -> try do Mix.ProjectStack.post_config(prune_code_paths: false)