From ec2cd31c1d4327cb3ea8be3627b488387d5f7272 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 27 Dec 2013 16:43:34 -0600 Subject: bottle: use formula path accessor --- Library/Homebrew/cmd/bottle.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Library/Homebrew/cmd') 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 -- cgit v1.2.3