Skip to content

Commit fba80fe

Browse files
authored
Merge pull request #20948 from Homebrew/fix-outdated-check-on-missing-core-formula
Don't fail if a formula stub doesn't exist when checking `Formula#outdated?`
2 parents 8f67192 + a69e5cd commit fba80fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Library/Homebrew/formula.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1743,7 +1743,7 @@ def outdated_kegs(fetch_head: false)
17431743
Formula.cache[:outdated_kegs][cache_key] ||= begin
17441744
all_kegs = []
17451745
current_version = T.let(false, T::Boolean)
1746-
latest = if core_formula? && Homebrew::EnvConfig.use_internal_api?
1746+
latest = if core_formula? && Homebrew::EnvConfig.use_internal_api? && Homebrew::API.formula_names.include?(full_name)
17471747
Homebrew::API::Internal.formula_stub(full_name)
17481748
else
17491749
latest_formula

0 commit comments

Comments
 (0)