diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index 28b5d4fa673..878f01a615e 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -323,6 +323,8 @@ class MachCommands(CommandBase): removing_anything = False for tool in ["rust", "cargo"]: base = path.join(self.context.sharedir, tool) + if not path.isdir(base): + continue for name in os.listdir(base): # We append `-alt` if LLVM assertions aren't enabled, # so use just the commit hash itself.