Skip to content

Conversation

@Ashishworks
Copy link

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.

@Ashishworks Ashishworks force-pushed the fix-2100-line-endings branch from f7430b1 to b78bba7 Compare January 17, 2026 11:07
@Ashishworks
Copy link
Author

Hi maintainers, the checks are green
This PR addresses Windows CRLF line ending issues that cause python\r / shebang errors in Docker (issue #2100) by enforcing LF via .gitattributes and renormalizing files.
Please let me know if you’d like any adjustments. Thanks!

Copy link
Member

@keshav-space keshav-space left a 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
Comment on lines 4 to 12
* 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this enough?

Suggested change
* 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

Copy link
Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Author

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.

@Ashishworks Ashishworks force-pushed the fix-2100-line-endings branch from 5010ee3 to 090d8d0 Compare January 22, 2026 18:41
Signed-off-by: Ashish <ashish061104@gmail.com>

A
@Ashishworks Ashishworks force-pushed the fix-2100-line-endings branch from 090d8d0 to 236c83c Compare January 22, 2026 18:51
@Ashishworks
Copy link
Author

Thanks @Ashishworks, See the comments below and also fix the commit message.

Thanks for the review @keshav-space
I’ve addressed all comments:

Simplified .gitattributes to just * text=auto eol=lf
Removed unintended renormalize changes (docs/make.bat and the test .md file)
Fixed the commits

Please re-review the latest update when possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows developers unable to run docker-compose due to line ending issues

2 participants