Skip to content
Snippets Groups Projects
Commit 26785dbe authored by Jack Nagel's avatar Jack Nagel
Browse files

Use Formula.path

parent 2d50501c
No related branches found
No related tags found
No related merge requests found
......@@ -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?
......
......@@ -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
......
......@@ -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]
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment