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

lando-cli: drop unneeded rewrite_shebang #179452

Merged
merged 2 commits into from
Aug 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions Formula/l/lando-cli.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
require "language/node"

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

desc "Cli part of Lando"
homepage "https://docs.lando.dev/cli"
url "https://github.com/lando/cli/archive/refs/tags/v3.21.2.tar.gz"
Expand All @@ -27,11 +23,9 @@ class LandoCli < Formula
depends_on "node@18"

def install
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
# We have to replace the shebang in the main executable from "/usr/bin/env node"
rewrite_shebang detected_node_shebang, libexec/"lib/node_modules/@lando/cli/bin/lando"
bin.install_symlink Dir["#{libexec}/bin/*"]
system bin/"lando", "config", "--channel=none"
system "npm", "install", *std_npm_args
bin.install libexec.glob("bin/*")
bin.env_script_all_files libexec/"bin", LANDO_CHANNEL: "none"
end

def caveats
Expand All @@ -42,7 +36,7 @@ def caveats
end

test do
output = shell_output("#{bin}/lando config --path proxyIp")
assert_match "127.0.0.1", output
assert_match "none", shell_output("#{bin}/lando config --path channel")
assert_match "127.0.0.1", shell_output("#{bin}/lando config --path proxyIp")
end
end
Loading