From c8a55757a035f1702d795ef53d7d9d722fe03de3 Mon Sep 17 00:00:00 2001 From: Jihyeon Kim Date: Wed, 7 Jan 2026 19:36:53 +0900 Subject: [PATCH] Fix broken ampcode package --- Formula/ampcode.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Formula/ampcode.rb b/Formula/ampcode.rb index 2881700..134b438 100644 --- a/Formula/ampcode.rb +++ b/Formula/ampcode.rb @@ -12,10 +12,14 @@ class Ampcode < Formula regex(/"version":\s*"([^"]+)"/i) end - depends_on "node@20" + depends_on "node" def install - system "npm", "install", "--prefix", libexec, "." - bin.install_symlink libexec/"node_modules/.bin/amp" + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + end + + test do + assert_match version.to_s, shell_output("#{bin}/amp --version") end end