Skip to content

Commit

Permalink
fix: Don't copy .pyc files from the template directory
Browse files Browse the repository at this point in the history
Close #2213

Signed-off-by: Frost Ming <[email protected]>
  • Loading branch information
frostming committed Aug 30, 2023
1 parent 19b6a1f commit 53b9c38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions news/2213.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Don't copy .pyc files from the template directory.
2 changes: 2 additions & 0 deletions src/pdm/cli/templates/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ def mirror(
dst.mkdir(exist_ok=True)
for child in src.iterdir():
ProjectTemplate.mirror(child, dst / child.name, skip, copyfunc)
elif src.name.endswith(".pyc"):
return
elif overwrite or not dst.exists():
copyfunc(src, dst)

Expand Down

0 comments on commit 53b9c38

Please sign in to comment.