mirror of
https://github.com/servo/servo.git
synced 2025-06-09 00:53:26 +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):
|
||||
continue
|
||||
for name in os.listdir(base):
|
||||
full_path = path.join(base, name)
|
||||
if name.startswith("rust-"):
|
||||
name = name[len("rust-"):]
|
||||
# We append `-alt` if LLVM assertions aren't enabled,
|
||||
# so use just the commit hash itself.
|
||||
# This may occasionally leave an extra nightly behind
|
||||
# but won't remove too many nightlies.
|
||||
if name.partition('-')[0] not in to_keep:
|
||||
if name.endswith("-alt"):
|
||||
name = name[:-len("-alt")]
|
||||
if name not in to_keep:
|
||||
removing_anything = True
|
||||
full_path = path.join(base, name)
|
||||
if force:
|
||||
print("Removing {}".format(full_path))
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue