mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Auto merge of #21316 - servo:jdm-patch-27, r=Manishearth
mach: Avoid python error when there's no cargo cache. This happens when we have a newly provisioned machine. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21316) <!-- Reviewable:end -->
This commit is contained in:
commit
5c5ed54a6b
1 changed files with 9 additions and 8 deletions
|
@ -366,14 +366,15 @@ class MachCommands(CommandBase):
|
||||||
elif os.path.isdir(path.join(git_db_dir, d)):
|
elif os.path.isdir(path.join(git_db_dir, d)):
|
||||||
packages["git"][crate_name]["exist"].append(("del", d, ""))
|
packages["git"][crate_name]["exist"].append(("del", d, ""))
|
||||||
|
|
||||||
for d in os.listdir(crates_src_dir):
|
if crates_src_dir:
|
||||||
crate_name = re.sub(r"\-\d+(\.\d+){1,3}.+", "", d)
|
for d in os.listdir(crates_src_dir):
|
||||||
if not packages["crates"].get(crate_name, False):
|
crate_name = re.sub(r"\-\d+(\.\d+){1,3}.+", "", d)
|
||||||
packages["crates"][crate_name] = {
|
if not packages["crates"].get(crate_name, False):
|
||||||
"current": [],
|
packages["crates"][crate_name] = {
|
||||||
"exist": [],
|
"current": [],
|
||||||
}
|
"exist": [],
|
||||||
packages["crates"][crate_name]["exist"].append(d)
|
}
|
||||||
|
packages["crates"][crate_name]["exist"].append(d)
|
||||||
|
|
||||||
total_size = 0
|
total_size = 0
|
||||||
for packages_type in ["git", "crates"]:
|
for packages_type in ["git", "crates"]:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue