Skip to content

Commit

Permalink
fix: Use shutil.rmtree instead of rm
Browse files Browse the repository at this point in the history
Windows environments may not have rm
  • Loading branch information
blairconrad committed Oct 25, 2024
1 parent 6037911 commit f0ebeac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion project/scripts/make
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def clean() -> None:
"""Delete build artifacts and cache files."""
paths_to_clean = ["build", "dist", "htmlcov", "site", ".coverage*", ".pdm-build"]
for path in paths_to_clean:
shell(f"rm -rf {path}")
shutil.rmtree(path, ignore_errors=True)

cache_dirs = {".cache", ".pytest_cache", ".mypy_cache", ".ruff_cache", "__pycache__"}
for dirpath in Path(".").rglob("*/"):
Expand Down

0 comments on commit f0ebeac

Please sign in to comment.