Use Formula.path
This commit is contained in:
parent
2d50501c4e
commit
26785dbe5d
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user