Normalize EOL for .sln (CRLF) and .cs, .sh (LF) #700
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a
.gitattributes
file to the v5-lts branch, specifically the same one that is on master, but tbh I'm only concerned about line 3:Motivation and Context
While running tests on BepInEx on macOS (I maintain a BepInEx pack for Subnautica and also Subnautica: Below Zero), I discovered that the
run_bepinex.sh
script distributed with the unix build of v5.4.22 has CRLF line endings, which prevents it from working. Simply converting the EOL to LF immediately resolved the issue. The issue isn't present in v5.4.21, and the changelog of 5.4.22 indicates thatrun_bepinex.sh
was modified in the update.Presumed cause of the issue is that 5.4.22 was built on a Windows machine, which checked out the
run_bepinex.sh
script with CRLF line endings, as there is no normalization set by a.gitattributes
file on the v5-lts branch.How Has This Been Tested?
Downloaded the
run_bepinex.sh
script from my fork after making the change and it's LF. Same on a Windows machine, which is ideal.However, it's worth noting that I also tested this on your v5-lts branch, and both on macOS and Windows it seems to download with the correct LF EOL, so I honestly have no idea how one with CRLF EOL ended up in the unix release build? I triple checked, the one in BepInEx_unix_5.4.22.zip is CRLF, and attempting to run it without fixing the EOL causes errors, which is what led me down this rabbit hole.
Whoever looks into this, you'll probably want to make 100% sure that whatever build process you have for releases takes EOL into account. Hopefully just adding this
.gitattributes
fixes that for you, but unfortunately, I have no way to test your release pipeline.Types of changes
Checklist: