8000 Ignore rmtree errors on Windows during cleanup · Develop-Python/cibuildwheel@4d32321 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 4d32321

Browse files
committed
Ignore rmtree errors on Windows during cleanup
This fails our CI occasionally, but we don't really care about the occasional file escaping deletion - this is more about hygene than anything else, so ignore errors on this step.
1 parent 14bb508 commit 4d32321

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cibuildwheel/windows.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,9 @@ def build(options: Options) -> None:
449449
shell(test_command_prepared, cwd="c:\\", env=virtualenv_env)
450450

451451
# clean up
452-
shutil.rmtree(venv_dir)
452+
# (we ignore errors because occasionally Windows fails to unlink a file and we
453+
# don't want to abort a build because of that)
454+
shutil.rmtree(venv_dir, ignore_errors=True)
453455

454456
# we're all done here; move it to output (remove if already exists)
455457
shutil.move(str(repaired_wheel), build_options.output_dir)

0 commit comments

Comments
 (0)
0