Allow Formula.canonical_name to use Pathname objects
This commit is contained in:
parent
f437c9040b
commit
acc33a56e7
@ -397,6 +397,9 @@ class Formula
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.canonical_name name
|
def self.canonical_name name
|
||||||
|
# Cast pathnames to strings.
|
||||||
|
name = name.to_s if name.kind_of? Pathname
|
||||||
|
|
||||||
formula_with_that_name = HOMEBREW_REPOSITORY+"Library/Formula/#{name}.rb"
|
formula_with_that_name = HOMEBREW_REPOSITORY+"Library/Formula/#{name}.rb"
|
||||||
possible_alias = HOMEBREW_REPOSITORY+"Library/Aliases/#{name}"
|
possible_alias = HOMEBREW_REPOSITORY+"Library/Aliases/#{name}"
|
||||||
possible_cached_formula = HOMEBREW_CACHE_FORMULA+"#{name}.rb"
|
possible_cached_formula = HOMEBREW_CACHE_FORMULA+"#{name}.rb"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user