From 44ee99795254d1006f4982d9449d14ba40be3ae4 Mon Sep 17 00:00:00 2001 From: ilovezfs Date: Thu, 28 Jun 2018 07:26:09 -0700 Subject: [PATCH] heroku: disable migrator Closes #29513. Signed-off-by: ilovezfs --- Formula/heroku.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Formula/heroku.rb b/Formula/heroku.rb index 4962cdfc70..8f977bc9a9 100644 --- a/Formula/heroku.rb +++ b/Formula/heroku.rb @@ -6,6 +6,7 @@ class Heroku < Formula # heroku should only be updated every 10 releases on multiples of 10 url "https://registry.npmjs.org/heroku/-/heroku-7.5.0.tgz" sha256 "e3e66b26167379b4d6ce6f40d7ca3f3bc89beadf75c26d01add8f84c41eb0381" + revision 1 head "https://github.com/heroku/cli.git" bottle do @@ -18,6 +19,16 @@ class Heroku < Formula depends_on "node" def install + # disable migrator + inreplace "lib/hooks/update/brew.js", "if (this.config.platform !== 'darwin')", + "if (true)" + + # disable outdated check + inreplace "package.json", /.*plugin-warn-if-update-available.*$\n/, "" + + # replace `heroku update` messaging + inreplace "bin/run", "npm update -g heroku", "brew upgrade heroku" + inreplace "bin/run", "#!/usr/bin/env node", "#!#{Formula["node"].opt_bin}/node" system "npm", "install", *Language::Node.std_npm_install_args(libexec)