mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00: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", ""):
|
||||
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"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue