formula_installer: use formula from Keg for local bottle installs

Use the formula file from the Keg if `local_bottle_install` is set,
which means that the formula file from the tap is used for `-s`,
`--HEAD` and normal installs but the formula file present within
formula.prefix/".brew" is used for local bottle installs.
This commit is contained in:
Nanda H Krishna 2021-06-10 23:21:26 +05:30
parent e6dd13d04e
commit a0dfe4aa18
No known key found for this signature in database
GPG Key ID: 067E5FCD58ADF3AA

View File

@ -1074,9 +1074,14 @@ class FormulaInstaller
-I #{$LOAD_PATH.join(File::PATH_SEPARATOR)}
--
#{HOMEBREW_LIBRARY_PATH}/postinstall.rb
#{formula.path}
]
args << if formula.local_bottle_path.present?
formula.prefix/".brew/#{formula.name}.rb"
else
formula.path
end
Utils.safe_fork do
if Sandbox.available?
sandbox = Sandbox.new