aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/command_base.py
diff options
context:
space:
mode:
authorMatt Brubeck <mbrubeck@limpet.net>2015-03-11 15:07:28 -0700
committerMatt Brubeck <mbrubeck@limpet.net>2015-03-11 15:07:28 -0700
commit4641640d14c5caa7088e38bd0cdfae062adc7156 (patch)
tree02e124eeb03ae296d0b2366096297b537d8010f5 /python/servo/command_base.py
parent7b6e314df1b93bd749eee9036927d795f26e1590 (diff)
downloadservo-4641640d14c5caa7088e38bd0cdfae062adc7156.tar.gz
servo-4641640d14c5caa7088e38bd0cdfae062adc7156.zip
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.
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r--python/servo/command_base.py5
1 files changed, 3 insertions, 2 deletions
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",