Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Commit

Permalink
🐛 Fix Windows shell scripts line endings after generation (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo authored Apr 18, 2020
1 parent 8724685 commit 34f3f29
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hooks/post_gen_project.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from pathlib import Path


path: Path
for path in Path(".").glob("**/*.sh"):
data = path.read_bytes()
lf_data = data.replace(b"\r\n", b"\n")
path.write_bytes(lf_data)

0 comments on commit 34f3f29

Please sign in to comment.