Ensure readall runs without API.

This commit is contained in:
Markus Reiter 2024-02-20 19:36:57 +01:00
parent 2d41fe8feb
commit 771193c80a
No known key found for this signature in database
GPG Key ID: 245293B51702655B

View File

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