Skip to content
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

fix: LICENSE line endings #236

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

fix: LICENSE line endings #236

wants to merge 3 commits into from

Conversation

klmcadams
Copy link
Contributor

Check if the license file has Windows line endings and if so, replace them with Unix line endings

Closes #232

@github-actions github-actions bot added the bug Something isn't working label Sep 27, 2024
@klmcadams klmcadams marked this pull request as draft September 27, 2024 20:32
@greschd
Copy link
Member

greschd commented Sep 28, 2024

I'm not sure this solution works in all cases.

We use git to manage line endings: on checkout in Windows, it converts to CRLF, but the committed line endings are always UNIX ones. See https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings

With this change, I think git would always show a change in the license file, which then disappears when staging the file.

Maybe the better solution would be to check line endings in the target file, and (if they are consistent), use those?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add-license-headers switches my LICENSE file endings
3 participants