Skip to content

Commit

Permalink
🐛 Fix Windows line endings for shell scripts after generation (fastap…
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo authored Apr 18, 2020
1 parent 3b96d4e commit ec7b21a
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 ec7b21a

Please sign in to comment.