From a9591c712f311f24ceb313a5e77b85006eefe5be Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Thu, 12 Sep 2024 02:16:01 +0800 Subject: [PATCH] formula: make `cargo` respect Homebrew-managed parallelism `cargo` doesn't follow setting `HOMEBREW_MAKE_JOBS` or `ENV.deparallelize`. Let's fix that. --- Library/Homebrew/formula.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index c38e97d185..f70f0860e3 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -1795,7 +1795,7 @@ class Formula params(root: T.any(String, Pathname), path: T.any(String, Pathname)).returns(T::Array[String]) } def std_cargo_args(root: prefix, path: ".") - ["--locked", "--root=#{root}", "--path=#{path}"] + ["--jobs", ENV.make_jobs.to_s, "--locked", "--root=#{root}", "--path=#{path}"] end # Standard parameters for CMake builds.