brew bump: more improvements

This commit is contained in:
Nanda H Krishna 2024-07-14 23:46:17 -04:00
parent 32d1f10fcf
commit d20add9786
No known key found for this signature in database
GPG Key ID: 067E5FCD58ADF3AA

View File

@ -22,9 +22,9 @@ module Homebrew
cmd_args do cmd_args do
description <<~EOS description <<~EOS
Display out-of-date brew formulae and the latest version available. If the Displays out-of-date packages and the latest version available. If the
returned current and livecheck versions differ or when querying specific returned current and livecheck versions differ or when querying specific
formulae, also displays whether a pull request has been opened with the URL. packages, also displays whether a pull request has been opened with the URL.
EOS EOS
switch "--full-name", switch "--full-name",
description: "Print formulae/casks with fully-qualified names." description: "Print formulae/casks with fully-qualified names."
@ -87,11 +87,18 @@ module Homebrew
"`HOMEBREW_EVAL_ALL` set!" "`HOMEBREW_EVAL_ALL` set!"
end end
if args.start_with
formulae_and_casks.select! do |formula_or_cask|
name = formula_or_cask.respond_to?(:token) ? formula_or_cask.token : formula_or_cask.name
name.start_with?(args.start_with)
end
end
formulae_and_casks = formulae_and_casks&.sort_by do |formula_or_cask| formulae_and_casks = formulae_and_casks&.sort_by do |formula_or_cask|
formula_or_cask.respond_to?(:token) ? formula_or_cask.token : formula_or_cask.name formula_or_cask.respond_to?(:token) ? formula_or_cask.token : formula_or_cask.name
end end
unless Utils::Curl.curl_supports_tls13? if args.repology? && !Utils::Curl.curl_supports_tls13?
begin begin
ensure_formula_installed!("curl", reason: "Repology queries") unless HOMEBREW_BREWED_CURL_PATH.exist? ensure_formula_installed!("curl", reason: "Repology queries") unless HOMEBREW_BREWED_CURL_PATH.exist?
rescue FormulaUnavailableError rescue FormulaUnavailableError