From 8430acf7ba5f50cdc2db2e060d81bdf45a7e3ead Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 15 Aug 2023 14:44:35 +0100 Subject: [PATCH] formula_installer: improve a comment. Based on: https://github.com/Homebrew/brew/pull/15778#discussion_r1294477218 --- Library/Homebrew/formula_installer.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 8f5c19e12f..be860d92ab 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -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