From a5af6e8ef4c7e1705a723bdeead6b802d4aedfdc Mon Sep 17 00:00:00 2001 From: commitay Date: Mon, 3 Sep 2018 18:59:53 +1000 Subject: [PATCH] formula: set `CARGO_HOME` to enable cache --- Library/Homebrew/formula.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index af2c449d7e..e1e5262fe0 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -1680,6 +1680,7 @@ class Formula HOMEBREW_PATH: nil, _JAVA_OPTIONS: "#{ENV["_JAVA_OPTIONS"]} -Duser.home=#{HOMEBREW_CACHE}/java_cache", GOCACHE: "#{HOMEBREW_CACHE}/go_cache", + CARGO_HOME: "#{HOMEBREW_CACHE}/cargo_cache", } ENV.clear_sensitive_environment! @@ -2034,6 +2035,7 @@ class Formula stage_env[:_JAVA_OPTIONS] = "#{ENV["_JAVA_OPTIONS"]} -Duser.home=#{HOMEBREW_CACHE}/java_cache" stage_env[:GOCACHE] = "#{HOMEBREW_CACHE}/go_cache" + stage_env[:CARGO_HOME] = "#{HOMEBREW_CACHE}/cargo_cache" stage_env[:CURL_HOME] = ENV["CURL_HOME"] || ENV["HOME"] end