Merge pull request #18328 from notfirefox/fix-rubocop-cache

style: resolve symblic links in `HOMEBREW_CACHE`
This commit is contained in:
Mike McQuaid 2024-09-16 17:23:51 +01:00 committed by GitHub
commit 8f5c74592e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -164,7 +164,9 @@ module Homebrew
args += files
cache_env = { "XDG_CACHE_HOME" => "#{HOMEBREW_CACHE}/style" }
HOMEBREW_CACHE.mkpath
cache_dir = HOMEBREW_CACHE.realpath
cache_env = { "XDG_CACHE_HOME" => "#{cache_dir}/style" }
FileUtils.rm_rf cache_env["XDG_CACHE_HOME"] if reset_cache