Skip to content

Commit be1dd01

Browse files
authored
Merge pull request #948 from pypa/windows-rm-ignore-errors
Ignore rmtree errors on Windows during cleanup
2 parents 52f7801 + 4d32321 commit be1dd01

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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)