Merge pull request #15561 from Bo98/postinstall-fix

formula_installer: fix postinstall using incorrect formula file
This commit is contained in:
Mike McQuaid 2023-06-19 13:33:22 +01:00 committed by GitHub
commit 7993085ad4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1115,7 +1115,7 @@ on_request: installed_on_request?, options: options)
# the formula from the tap.
formula_path = begin
keg_formula_path = formula.opt_prefix/".brew/#{formula.name}.rb"
tap_formula_path = formula.path
tap_formula_path = formula.specified_path
keg_formula = Formulary.factory(keg_formula_path)
tap_formula = Formulary.factory(tap_formula_path) if tap_formula_path.exist?
other_version_installed = (keg_formula.pkg_version != tap_formula&.pkg_version)