mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Added default fall-back when CARGO_HOME is not set for clean-cargo-cache
This commit is contained in:
parent
bda560d01b
commit
a8ac8c8929
1 changed files with 2 additions and 1 deletions
|
@ -189,7 +189,8 @@ class MachCommands(CommandBase):
|
||||||
if os.environ.get("CARGO_HOME", ""):
|
if os.environ.get("CARGO_HOME", ""):
|
||||||
cargo_dir = os.environ.get("CARGO_HOME")
|
cargo_dir = os.environ.get("CARGO_HOME")
|
||||||
else:
|
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):
|
if not os.path.isdir(cargo_dir):
|
||||||
return
|
return
|
||||||
cargo_file = open(path.join(self.context.topdir, "Cargo.lock"))
|
cargo_file = open(path.join(self.context.topdir, "Cargo.lock"))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue