mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
tap: fix handling of taps without formulae
This commit is contained in:
parent
cf180bbc96
commit
0a9e69ffdf
@ -508,7 +508,13 @@ class Tap
|
|||||||
sig { returns(T::Array[Pathname]) }
|
sig { returns(T::Array[Pathname]) }
|
||||||
def formula_files
|
def formula_files
|
||||||
@formula_files ||= if formula_dir.directory?
|
@formula_files ||= if formula_dir.directory?
|
||||||
formula_dir.find.select(&method(:formula_file?))
|
if formula_dir == path
|
||||||
|
# We only want the top level here so we don't treat commands & casks as formulae.
|
||||||
|
# Sharding is only supported in Formula/ and HomebrewFormula/.
|
||||||
|
formula_dir.children
|
||||||
|
else
|
||||||
|
formula_dir.find
|
||||||
|
end.select(&method(:formula_file?))
|
||||||
else
|
else
|
||||||
[]
|
[]
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user