Skip to content

Commit

Permalink
heroku: 9.5.1 (new formula)
Browse files Browse the repository at this point in the history
  • Loading branch information
SMillerDev committed Dec 9, 2024
1 parent 5d2f85d commit a1f93cf
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Formula/h/heroku.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
class Heroku < Formula
desc "CLI for Heroku"
homepage "https://www.npmjs.com/package/heroku/"
url "https://registry.npmjs.org/heroku/-/heroku-9.5.1.tgz"
sha256 "1dd66255bdc57f742c091671b2f84f6ee4faca8b9bd967d8528678182cf2a6b5"
license "ISC"

depends_on "node"
depends_on "terminal-notifier"

def install
system "npm", "install", *std_npm_args
bin.install_symlink Dir["#{libexec}/bin/*"]

node_modules = libexec/"lib/node_modules/heroku/node_modules"
# Remove vendored pre-built binary `terminal-notifier`
node_notifier_vendor_dir = node_modules/"node-notifier/vendor"
rm_r(node_notifier_vendor_dir) # remove vendored pre-built binaries

if OS.mac?
terminal_notifier_dir = node_notifier_vendor_dir/"mac.noindex"
terminal_notifier_dir.mkpath

# replace vendored `terminal-notifier` with our own
terminal_notifier_app = Formula["terminal-notifier"].opt_prefix/"terminal-notifier.app"
ln_sf terminal_notifier_app.relative_path_from(terminal_notifier_dir), terminal_notifier_dir
end

# Replace universal binaries with their native slices.
deuniversalize_machos
end

test do
assert_match "Error: not logged in", shell_output("#{bin}/heroku auth:whoami 2>&1", 100)
end
end

0 comments on commit a1f93cf

Please sign in to comment.