diff options
| author | Jack Nagel | 2013-12-27 16:43:34 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-12-27 16:43:34 -0600 |
| commit | ec2cd31c1d4327cb3ea8be3627b488387d5f7272 (patch) | |
| tree | d0965c4a4453794672a880aebf8de391a5500f12 /Library/Homebrew/cmd/bottle.rb | |
| parent | c95b90a02224473446f22b59f4aae6630ab387c8 (diff) | |
| download | brew-ec2cd31c1d4327cb3ea8be3627b488387d5f7272.tar.bz2 | |
bottle: use formula path accessor
Diffstat (limited to 'Library/Homebrew/cmd/bottle.rb')
| -rw-r--r-- | Library/Homebrew/cmd/bottle.rb | 7 |
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 |
