From 8169383485718b2ea65510934a985985aef47b38 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 19 Oct 2017 17:09:09 +0200 Subject: Fix './mach clean-nightlies --keep 3' not keeping anything. --- python/servo/bootstrap_commands.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'python/servo/bootstrap_commands.py') diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index 5d09fadb806..e02f0a4a7d4 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -306,7 +306,10 @@ class MachCommands(CommandBase): stdout, _ = cmd.communicate() for line in stdout.splitlines(): if line.startswith(b"+") and not line.startswith(b"+++"): - to_keep.add(line[1:]) + line = line[len(b"+"):] + if line.startswith(b"nightly-"): + line = line[len(b"nightly-"):] + to_keep.add(line) removing_anything = False for tool in ["rust", "cargo"]: -- cgit v1.2.3