From 4641640d14c5caa7088e38bd0cdfae062adc7156 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Wed, 11 Mar 2015 15:07:28 -0700 Subject: Add an environment variable to override cache-dir This will be set in servo/saltfs to prevent our buildbot builders from re-downloading the build tools for every build. --- python/servo/command_base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'python/servo/command_base.py') diff --git a/python/servo/command_base.py b/python/servo/command_base.py index b8474c85044..9f1c96c57f6 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -69,8 +69,9 @@ class CommandBase(object): # Handle missing/default items self.config.setdefault("tools", {}) - self.config["tools"].setdefault("cache-dir", - path.join(context.topdir, ".servo")) + default_cache_dir = os.environ.get("SERVO_CACHE_DIR", + path.join(context.topdir, ".servo")) + self.config["tools"].setdefault("cache-dir", default_cache_dir) resolverelative("tools", "cache-dir") self.config["tools"].setdefault("cargo-home-dir", -- cgit v1.2.3