From ecc867f80110f2b7ce658c7a81f4a81ce72acb89 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Sun, 27 Oct 2024 18:13:42 -0400 Subject: [PATCH] grafana: use corepack from node formula Signed-off-by: Rui Chen --- Formula/g/grafana.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Formula/g/grafana.rb b/Formula/g/grafana.rb index 11c70316c795..9fbdc0d1d05a 100644 --- a/Formula/g/grafana.rb +++ b/Formula/g/grafana.rb @@ -20,7 +20,6 @@ class Grafana < Formula sha256 cellar: :any_skip_relocation, x86_64_linux: "a991b2b28dd98b90bf7c03da0683beb57f17f28554c47a2aead4c9eac2fe00dd" end - depends_on "corepack" => :build depends_on "go" => :build depends_on "node" => :build @@ -34,11 +33,15 @@ class Grafana < Formula def install ENV["NODE_OPTIONS"] = "--max-old-space-size=8000" + + ENV["COREPACK_ENABLE_DOWNLOAD_PROMPT"] = "0" + system "corepack", "enable", "--install-directory", buildpath + system "make", "gen-go" system "go", "run", "build.go", "build" - system "yarn", "install" - system "yarn", "build" + system buildpath/"yarn", "install" + system buildpath/"yarn", "build" os = OS.kernel_name.downcase arch = Hardware::CPU.intel? ? "amd64" : Hardware::CPU.arch.to_s