aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula_installer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/formula_installer.rb')
-rw-r--r--Library/Homebrew/formula_installer.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 4966151a3..ea4415796 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -308,7 +308,12 @@ class FormulaInstaller
clean
# Store the formula used to build the keg in the keg.
- s = formula.path.read.gsub(/ bottle do.+?end\n\n?/m, "")
+ formula_contents = if formula.local_bottle_path
+ Utils::Bottles.formula_contents formula.local_bottle_path, name: formula.name
+ else
+ formula.path.read
+ end
+ s = formula_contents.gsub(/ bottle do.+?end\n\n?/m, "")
brew_prefix = formula.prefix/".brew"
brew_prefix.mkdir
Pathname(brew_prefix/"#{formula.name}.rb").atomic_write(s)