aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/bottle.rb
diff options
context:
space:
mode:
authorJack Nagel2013-12-27 16:43:34 -0600
committerJack Nagel2013-12-27 16:43:34 -0600
commitec2cd31c1d4327cb3ea8be3627b488387d5f7272 (patch)
treed0965c4a4453794672a880aebf8de391a5500f12 /Library/Homebrew/cmd/bottle.rb
parentc95b90a02224473446f22b59f4aae6630ab387c8 (diff)
downloadbrew-ec2cd31c1d4327cb3ea8be3627b488387d5f7272.tar.bz2
bottle: use formula path accessor
Diffstat (limited to 'Library/Homebrew/cmd/bottle.rb')
-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