formula: handle unavailable versioned formulae.
If people decide to copy these into their Homebrew/homebrew-core `Formula` directory then it breaks generating the hash for any non-versioned formulae. See https://github.com/Homebrew/homebrew-bundle/issues/351
This commit is contained in:
parent
5d4adead0b
commit
e52d6dba79
@ -385,8 +385,12 @@ class Formula
|
|||||||
return [] if versioned_formula?
|
return [] if versioned_formula?
|
||||||
|
|
||||||
Pathname.glob(path.to_s.gsub(/\.rb$/, "@*.rb")).map do |path|
|
Pathname.glob(path.to_s.gsub(/\.rb$/, "@*.rb")).map do |path|
|
||||||
|
begin
|
||||||
Formula[path.basename(".rb").to_s]
|
Formula[path.basename(".rb").to_s]
|
||||||
end.sort
|
rescue FormulaUnavailableError
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
end.compact.sort
|
||||||
end
|
end
|
||||||
|
|
||||||
# A named Resource for the currently active {SoftwareSpec}.
|
# A named Resource for the currently active {SoftwareSpec}.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user