mirror of
https://github.com/servo/servo.git
synced 2025-06-20 15:18:58 +01:00
Move snapshot dir inside the source dir by default
This avoids changing any directories outside the repo, which is better for some automation scenarios. The servobuild.example file has a "cache-dir" setting that restores the previous default location of `~/.servo`, which is useful for developers working with multiple clones on the same machine.
This commit is contained in:
parent
0f81e70882
commit
53135b2566
2 changed files with 8 additions and 3 deletions
|
@ -54,9 +54,6 @@ class CommandBase(object):
|
|||
if not hasattr(self.context, "bootstrapped"):
|
||||
self.context.bootstrapped = False
|
||||
|
||||
if not hasattr(self.context, "sharedir"):
|
||||
self.context.sharedir = path.join(path.expanduser("~/"), ".servo")
|
||||
|
||||
config_path = path.join(context.topdir, ".servobuild")
|
||||
if path.exists(config_path):
|
||||
self.config = toml.loads(open(config_path).read())
|
||||
|
@ -65,6 +62,11 @@ class CommandBase(object):
|
|||
|
||||
# Handle missing/default items
|
||||
self.config.setdefault("tools", {})
|
||||
self.config["tools"].setdefault("cache-dir",
|
||||
path.join(context.topdir, ".servo"))
|
||||
# Allow "~" in cache-dir
|
||||
context.sharedir = path.expanduser(self.config["tools"]["cache-dir"])
|
||||
|
||||
self.config["tools"].setdefault("system-rust", False)
|
||||
self.config["tools"].setdefault("system-cargo", False)
|
||||
self.config["tools"].setdefault("rust-root", "")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue