From 26785dbe5ddaee3f71d64d4a9f8b92274ec3a366 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 28 Feb 2014 16:51:15 -0600 Subject: Use Formula.path --- Library/Homebrew/cmd/edit.rb | 2 +- Library/Homebrew/cmd/install.rb | 2 +- Library/Homebrew/cmd/log.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/edit.rb b/Library/Homebrew/cmd/edit.rb index 4e3298c3f..4389087d4 100644 --- a/Library/Homebrew/cmd/edit.rb +++ b/Library/Homebrew/cmd/edit.rb @@ -30,7 +30,7 @@ module Homebrew extend self if name.include? '/' Pathname.new(name) else - HOMEBREW_REPOSITORY+"Library/Formula/#{name}.rb" + Formula.path(name) end end unless ARGV.force? diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 4e1705c74..cd3c3c8d2 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -25,7 +25,7 @@ module Homebrew extend self ARGV.named.each do |name| # if a formula has been tapped ignore the blacklisting - if not File.file? HOMEBREW_REPOSITORY/"Library/Formula/#{name}.rb" + unless Formula.path(name).file? msg = blacklisted? name raise "No available formula for #{name}\n#{msg}" if msg end diff --git a/Library/Homebrew/cmd/log.rb b/Library/Homebrew/cmd/log.rb index 5f0ef63c8..ca005d553 100644 --- a/Library/Homebrew/cmd/log.rb +++ b/Library/Homebrew/cmd/log.rb @@ -8,7 +8,7 @@ module Homebrew extend self path = ARGV.formulae.first.path.realpath rescue FormulaUnavailableError # Maybe the formula was deleted - path = HOMEBREW_REPOSITORY/"Library/Formula/#{ARGV.named.first}.rb" + path = Formula.path(ARGV.named.first) end cd path.dirname # supports taps exec "git", "log", *ARGV.options_only + ["--", path] -- cgit v1.2.3