-
-
Notifications
You must be signed in to change notification settings - Fork 266
Enforce LF line endings to fix Windows Docker setup #2114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
f7430b1 to
b78bba7
Compare
|
Hi maintainers, the checks are green |
keshav-space
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Ashishworks, See the comments below and also fix the commit message.
.gitattributes
Outdated
| * text=auto eol=lf | ||
|
|
||
| *.py text eol=lf | ||
| *.sh text eol=lf | ||
| Dockerfile text eol=lf | ||
| Makefile text eol=lf | ||
| *.yml text eol=lf | ||
| *.yaml text eol=lf | ||
| *.env text eol=lf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this enough?
| * text=auto eol=lf | |
| *.py text eol=lf | |
| *.sh text eol=lf | |
| Dockerfile text eol=lf | |
| Makefile text eol=lf | |
| *.yml text eol=lf | |
| *.yaml text eol=lf | |
| *.env text eol=lf | |
| * text=auto eol=lf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, the single * text=auto eol=lf rule is enough. I’ve updated the PR to keep only that and removed the file-specific entries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was an unintended line-ending change caused by renormalization. I’ve reverted it and the PR now only updates .gitattributes.
5010ee3 to
090d8d0
Compare
Signed-off-by: Ashish <ashish061104@gmail.com> A
090d8d0 to
236c83c
Compare
Thanks for the review @keshav-space Simplified .gitattributes to just * text=auto eol=lf Please re-review the latest update when possible |
Fixes #2100
Windows clones may convert LF to CRLF, causing Docker/Linux to fail with python\r in shebang lines (e.g., manage.py).
This PR enforces LF line endings using .gitattributes and renormalizes files accordingly.
Tested:
docker compose run vulnerablecode ./manage.py import --list works on Windows with Docker.