diff --git a/Library/Homebrew/style.rb b/Library/Homebrew/style.rb index a23e9b4398..6400f8f0af 100644 --- a/Library/Homebrew/style.rb +++ b/Library/Homebrew/style.rb @@ -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