oatpp / oatpp-starter

Oatpp simple-API starter project
https://oatpp.io/
Apache License 2.0
72 stars 35 forks source link

Ask Git to use LF Line endings through a .gitattributes file #11

Closed elaine-jackson closed 4 years ago

elaine-jackson commented 4 years ago

This pull request adds a .gitattributes file which configures Git to use LF line endings. This change is necessary because Git for Windows will convert all of the line endings to CRLF by default. As a result, the Dockerfile provided within oatpp-starter will not work out of the box on a Windows Development Machine until you swap the line endings in your code editor. This may frustrate people new to the oatpp framework.

If the line endings are set to CRLF in the Dockerfile you will get a vague error message stating that /service/utility/install-oatpp-modules.sh was not found. This is because path line endings are not set correctly and are not understood by Docker.

lganzzzo commented 4 years ago

Hey, Thanks for your contribution!
A good one!

elaine-jackson commented 4 years ago

@Iganzzzo I haven’t tested yet but I imagine this is also an issue for the other example projects. Can I make a few PRs and reference this pull request as context so I’m not retyping all of this out for each project? Thanks for merging so quickly 😎

elaine-jackson commented 4 years ago

Opps @lganzzzo looks like GitHub Mobile didn't tag you properly earlier.

lganzzzo commented 4 years ago

Hey @irlcatgirl , sorry, missed your previous message.

Can I make a few PRs and reference this pull request as context so I’m not retyping all of this out for each project?

Sure, it would be great!