aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-12-27 16:43:34 -0600
committerJack Nagel2013-12-27 16:43:34 -0600
commit6206773253b9b1c4de984de214eb5cf4adbe91e4 (patch)
tree4cfb136a835b035b024024656902df2ec86c5c16 /Library
parente67bdb1351e6d8be2db2e26c74cb2e8934080258 (diff)
downloadhomebrew-6206773253b9b1c4de984de214eb5cf4adbe91e4.tar.bz2
bottle: use formula path accessor
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