diff --git a/bin/task_bench/tasks.py b/bin/task_bench/tasks.py index 63123b9f..fa7775ee 100644 --- a/bin/task_bench/tasks.py +++ b/bin/task_bench/tasks.py @@ -110,11 +110,8 @@ def tests_in_copy(containers: Containers, tree: str, folder: pathlib.Path, git: copied = on_disk(f"copy {tree} to test it", lambda: shutil.copytree(tree, copy, symlinks=True)) if isinstance(copied, Failure): return copied - if failure := committed(git, str(copy)): - shutil.rmtree(copy, ignore_errors=True) - return failure try: - return ran_tests(containers, str(copy)) + return committed(git, str(copy)) or ran_tests(containers, str(copy)) finally: shutil.rmtree(copy, ignore_errors=True)