Skip to content

Commit af4e0cf

Browse files
authored
🐛 Fix Windows line endings for shell scripts after generation (#149)
1 parent 001dbda commit af4e0cf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

hooks/post_gen_project.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from pathlib import Path
2+
3+
4+
path: Path
5+
for path in Path(".").glob("**/*.sh"):
6+
data = path.read_bytes()
7+
lf_data = data.replace(b"\r\n", b"\n")
8+
path.write_bytes(lf_data)

0 commit comments

Comments
 (0)