mirror of
https://github.com/servo/servo.git
synced 2025-06-09 17:13:24 +00:00
Auto merge of #18828 - servo:clean, r=asajeffrey
Fix a couple bugs in `./mach clean-nightlies` <!-- 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/18828) <!-- Reviewable:end -->
This commit is contained in:
commit
d0159be172
1 changed files with 4 additions and 6 deletions
|
@ -314,15 +314,13 @@ class MachCommands(CommandBase):
|
||||||
if not path.isdir(base):
|
if not path.isdir(base):
|
||||||
continue
|
continue
|
||||||
for name in os.listdir(base):
|
for name in os.listdir(base):
|
||||||
|
full_path = path.join(base, name)
|
||||||
if name.startswith("rust-"):
|
if name.startswith("rust-"):
|
||||||
name = name[len("rust-"):]
|
name = name[len("rust-"):]
|
||||||
# We append `-alt` if LLVM assertions aren't enabled,
|
if name.endswith("-alt"):
|
||||||
# so use just the commit hash itself.
|
name = name[:-len("-alt")]
|
||||||
# This may occasionally leave an extra nightly behind
|
if name not in to_keep:
|
||||||
# but won't remove too many nightlies.
|
|
||||||
if name.partition('-')[0] not in to_keep:
|
|
||||||
removing_anything = True
|
removing_anything = True
|
||||||
full_path = path.join(base, name)
|
|
||||||
if force:
|
if force:
|
||||||
print("Removing {}".format(full_path))
|
print("Removing {}".format(full_path))
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue