Merge pull request #16713 from reitermarkus/tap-formula-files
Support `Tap#formula_files` when using API.
This commit is contained in:
commit
318256c0b4
@ -38,6 +38,7 @@ module Homebrew
|
||||
def readall
|
||||
args = readall_args.parse
|
||||
|
||||
Homebrew.with_no_api_env do
|
||||
if args.syntax? && args.no_named?
|
||||
scan_files = "#{HOMEBREW_LIBRARY_PATH}/**/*.rb"
|
||||
ruby_files = Dir.glob(scan_files).grep_v(%r{/(vendor)/})
|
||||
@ -56,7 +57,7 @@ module Homebrew
|
||||
raise UsageError, "`brew readall` needs a tap or `--eval-all` passed or `HOMEBREW_EVAL_ALL` set!"
|
||||
end
|
||||
|
||||
Tap
|
||||
Tap.select(&:installed?)
|
||||
else
|
||||
args.named.to_installed_taps
|
||||
end
|
||||
@ -66,3 +67,4 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -1146,9 +1146,9 @@ class CoreTap < AbstractCoreTap
|
||||
# @private
|
||||
sig { returns(T::Array[Pathname]) }
|
||||
def formula_files
|
||||
return super if Homebrew::EnvConfig.no_install_from_api? || installed?
|
||||
return super if Homebrew::EnvConfig.no_install_from_api?
|
||||
|
||||
raise TapUnavailableError, name
|
||||
formula_files_by_name.values
|
||||
end
|
||||
|
||||
# @private
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user