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:
Mike McQuaid 2020-04-14 14:20:43 +01:00
parent 86ee3b5744
commit 5366da76fd
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -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