mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Clear cached curl path where HOMEBREW_CURL changes
This commit is contained in:
parent
db8ab91429
commit
50437ca07e
@ -823,6 +823,7 @@ class FormulaInstaller
|
||||
if formula.name == "curl" &&
|
||||
!DevelopmentTools.curl_handles_most_https_certificates?
|
||||
ENV["HOMEBREW_CURL"] = formula.opt_bin/"curl"
|
||||
Utils::Curl.clear_path_cache
|
||||
end
|
||||
|
||||
caveats
|
||||
|
@ -203,6 +203,7 @@ RSpec.configure do |config|
|
||||
FormulaInstaller.clear_attempted
|
||||
FormulaInstaller.clear_installed
|
||||
FormulaInstaller.clear_fetched
|
||||
Utils::Curl.clear_path_cache
|
||||
|
||||
TEST_DIRECTORIES.each(&:mkpath)
|
||||
|
||||
|
@ -42,6 +42,10 @@ module Utils
|
||||
@curl_path ||= Utils.popen_read(curl_executable, "--homebrew=print-path").chomp.presence
|
||||
end
|
||||
|
||||
def clear_path_cache
|
||||
@curl_path = nil
|
||||
end
|
||||
|
||||
sig {
|
||||
params(
|
||||
extra_args: T.untyped,
|
||||
|
Loading…
x
Reference in New Issue
Block a user