Skip to content

Commit

Permalink
lando-cli: drop unneeded rewrite_shebang
Browse files Browse the repository at this point in the history
  • Loading branch information
branchvincent committed Aug 3, 2024
1 parent c2f1de3 commit dbbc648
Showing 1 changed file with 5 additions and 11 deletions.
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

0 comments on commit dbbc648

Please sign in to comment.