cli/args: add formulae_paths helper.
This allows getting the formulae passed as arguments while not having to read the file or raising an exception on invalid syntax.
This commit is contained in:
parent
86ee3b5744
commit
5366da76fd
@ -99,6 +99,12 @@ module Homebrew
|
||||
end.uniq(&:name)
|
||||
end
|
||||
|
||||
def formulae_paths
|
||||
@formulae_paths ||= (downcased_unique_named - casks).map do |name|
|
||||
Formulary.path(name)
|
||||
end.uniq(&:name)
|
||||
end
|
||||
|
||||
def casks
|
||||
@casks ||= downcased_unique_named.grep HOMEBREW_CASK_TAP_CASK_REGEX
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user