Merge pull request #17842 from sazriel26/livecheck-for-head-only

[livecheck] Help to check head only formulae
This commit is contained in:
Sam Ford 2024-07-25 13:40:08 -04:00 committed by GitHub
commit 34fbf09841
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -269,7 +269,7 @@ module Homebrew
# comparison.
current = if formula
if formula.head_only?
formula.any_installed_version.version.commit
Version.new(formula.any_installed_version.version.commit)
else
T.must(formula.stable).version
end
@ -281,7 +281,7 @@ module Homebrew
current = LivecheckVersion.create(formula_or_cask, current)
latest = if formula&.head_only?
T.must(formula.head).downloader.fetch_last_commit
Version.new(T.must(formula.head).downloader.fetch_last_commit)
else
version_info = latest_version(
formula_or_cask,