Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: drop unneeded scripts #177454

Merged
merged 10 commits into from
Aug 2, 2024
11 changes: 0 additions & 11 deletions Formula/a/apify-cli.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
require "language/node"

class ApifyCli < Formula
include Language::Node::Shebang

desc "Apify command-line interface"
homepage "https://docs.apify.com/cli"
url "https://registry.npmjs.org/apify-cli/-/apify-cli-0.20.2.tgz"
Expand All @@ -23,13 +19,6 @@ class ApifyCli < Formula

def install
system "npm", "install", *std_npm_args
# We have to replace the shebang in the main executable from "/usr/bin/env node"
# to point to the Homebrew-provided `node`,
# because otherwise the CLI will run with the system-provided Node.js,
# which might be a different version than the one installed by Homebrew,
# causing issues that `node_modules` were installed with one Node.js version
# but the CLI is running them with another Node.js version.
rewrite_shebang detected_node_shebang, libexec/"lib/node_modules/apify-cli/bin/run.js"
bin.install_symlink Dir["#{libexec}/bin/*"]
end

Expand Down
6 changes: 2 additions & 4 deletions Formula/b/bcoin.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class Bcoin < Formula
desc "Javascript bitcoin library for node.js and browsers"
homepage "https://bcoin.io"
Expand Down Expand Up @@ -32,8 +30,8 @@ def node
end

def install
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
(bin/"bcoin").write_env_script libexec/"bin/bcoin", PATH: "#{node.opt_bin}:$PATH"
system "npm", "install", *std_npm_args
bin.install_symlink Dir["#{libexec}/bin/*"]
end

test do
Expand Down
7 changes: 1 addition & 6 deletions Formula/c/cloudflare-wrangler2.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
require "language/node"

class CloudflareWrangler2 < Formula
include Language::Node::Shebang

desc "CLI tool for Cloudflare Workers"
homepage "https://github.com/cloudflare/workers-sdk"
url "https://registry.npmjs.org/wrangler/-/wrangler-3.68.0.tgz"
Expand All @@ -22,8 +18,7 @@ class CloudflareWrangler2 < Formula
depends_on "node"

def install
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
rewrite_shebang detected_node_shebang, *Dir["#{libexec}/lib/node_modules/**/*"]
system "npm", "install", *std_npm_args
bin.install_symlink Dir["#{libexec}/bin/wrangler*"]
end

Expand Down
6 changes: 1 addition & 5 deletions Formula/g/grammarly-languageserver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ class GrammarlyLanguageserver < Formula

def install
system "npm", "install", *std_npm_args
(bin/"grammarly-languageserver").write <<~EOS
#! /usr/bin/env sh

#{Formula["node@16"].bin}/node #{libexec}/bin/grammarly-languageserver "$@"
EOS
bin.install_symlink Dir["#{libexec}/bin/*"]
end

test do
Expand Down
6 changes: 2 additions & 4 deletions Formula/m/mongosh.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class Mongosh < Formula
desc "MongoDB Shell to connect, configure, query, and work with your MongoDB database"
homepage "https://github.com/mongodb-js/mongosh"
Expand All @@ -20,8 +18,8 @@ class Mongosh < Formula
depends_on "node"

def install
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
(bin/"mongosh").write_env_script libexec/"bin/mongosh", PATH: "#{Formula["node"].opt_bin}:$PATH"
system "npm", "install", *std_npm_args
bin.install_symlink Dir["#{libexec}/bin/*"]
end

test do
Expand Down
Loading