aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/bottle.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb
index 9135af414..85818f0bb 100644
--- a/Library/Homebrew/cmd/bottle.rb
+++ b/Library/Homebrew/cmd/bottle.rb
@@ -202,10 +202,9 @@ module Homebrew extend self
if ARGV.include? '--write'
f = Formula.factory formula_name
- formula_relative_path = "Library/Formula/#{f.name}.rb"
- formula_path = HOMEBREW_REPOSITORY+formula_relative_path
has_bottle_block = f.class.bottle.checksums.any?
- inreplace formula_path do |s|
+
+ inreplace f.path do |s|
if has_bottle_block
s.sub!(/ bottle do.+?end\n/m, output)
else
@@ -217,7 +216,7 @@ module Homebrew extend self
safe_system 'git', 'commit', '--no-edit', '--verbose',
"--message=#{f.name}: #{update_or_add} #{f.version} bottle.",
- '--', formula_path
+ '--', f.path
end
end
exit 0