aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/bootstrap_commands.py
diff options
context:
space:
mode:
authorTimur Borkhodoev <timur.borkhodoev@mail.utoronto.ca>2018-01-22 23:27:30 -0500
committerTimur Borkhodoev <timurborkhodoev@Timurs-MacBook-Pro.local>2018-01-22 23:29:58 -0500
commita8ac8c8929a6218874069bf5f0d7aa7c94dc2511 (patch)
treeaf66b2870f34e3f6b0f82d5d3671afb31d19a4d4 /python/servo/bootstrap_commands.py
parentbda560d01b6a9452a9124957f39b99a701aac25c (diff)
downloadservo-a8ac8c8929a6218874069bf5f0d7aa7c94dc2511.tar.gz
servo-a8ac8c8929a6218874069bf5f0d7aa7c94dc2511.zip
Added default fall-back when CARGO_HOME is not set for clean-cargo-cache
Diffstat (limited to 'python/servo/bootstrap_commands.py')
-rw-r--r--python/servo/bootstrap_commands.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py
index 90391785698..47f56bb167c 100644
--- a/python/servo/bootstrap_commands.py
+++ b/python/servo/bootstrap_commands.py
@@ -189,7 +189,8 @@ class MachCommands(CommandBase):
if os.environ.get("CARGO_HOME", ""):
cargo_dir = os.environ.get("CARGO_HOME")
else:
- cargo_dir = path.join(self.context.topdir, ".cargo")
+ home_dir = os.path.expanduser("~")
+ cargo_dir = path.join(home_dir, ".cargo")
if not os.path.isdir(cargo_dir):
return
cargo_file = open(path.join(self.context.topdir, "Cargo.lock"))