diff options
| -rw-r--r-- | Library/Homebrew/cmd/edit.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/install.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/log.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/formula.rb | 2 |
4 files changed, 4 insertions, 4 deletions
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] diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 141f12636..c632fba2e 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -403,7 +403,7 @@ class Formula end # test if the name is a core formula - formula_with_that_name = Pathname.new("#{HOMEBREW_LIBRARY}/Formula/#{name}.rb") + formula_with_that_name = Formula.path(name) if formula_with_that_name.file? and formula_with_that_name.readable? return name end |
