aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/bottle.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb
index 04f2fb3ef..3927d84da 100644
--- a/Library/Homebrew/cmd/bottle.rb
+++ b/Library/Homebrew/cmd/bottle.rb
@@ -194,7 +194,12 @@ module Homebrew extend self
if ARGV.include? '--write'
f = Formula.factory formula_name
- formula_path = HOMEBREW_REPOSITORY+"Library/Formula/#{f.name}.rb"
+ formula_relative_path = "Library/Formula/#{f.name}.rb"
+ if File.exists? formula_relative_path
+ formula_path = Pathname.new(formula_relative_path)
+ else
+ formula_path = HOMEBREW_REPOSITORY+formula_relative_path
+ end
inreplace formula_path do |s|
if f.bottle
s.gsub!(/ bottle do.+?end\n/m, output)