Merge pull request #15869 from MikeMcQuaid/formula_installer_previously_fetched_formula_comment

formula_installer: improve a comment.
This commit is contained in:
Mike McQuaid 2023-08-15 14:58:44 +01:00 committed by GitHub
commit 4c87937b98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1187,7 +1187,11 @@ on_request: installed_on_request?, options: options)
sig { returns(T.nilable(Formula)) }
def previously_fetched_formula
# We intentionally don't compare classes here.
# We intentionally don't compare classes here:
# from-API-JSON and from-source formula classes are not equal but we
# want to equate them to be the same thing here given mixing bottle and
# from-source installs of the same formula within the same operation
# doesn't make sense.
self.class.fetched.find do |fetched_formula|
fetched_formula.full_name == formula.full_name && fetched_formula.active_spec_sym == formula.active_spec_sym
end