formula_installer: fix postinstall using incorrect formula file

This commit is contained in:
Bo Anderson 2023-06-19 03:43:26 +01:00
parent e986264a3e
commit f1d3700744
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65

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)