When running cookiecutter on Windows the output is different from running it on posix.
In particular even though templates use LF line endings, the results is files with CRLF line endings.
CRLF is bad in general in my book, but here converting to CRLF is not so nice.
Since Jinja uses LF by default, I wonder if this is not because Git would be trying to convert things, though my Git settings on Windows are set to make no conversions at all
@audreyr this is a failing test for a start. cloning is not the culprit. The issue happens somewhere during file generation
The commits in https://github.com/audreyr/cookiecutter/pull/406 shoud fix it.
Is anyone looking at this ticket? I've come across this and would be interested in a solution.
@themanifold please go for it!
I came across this issue because I use cookiecutter in Windows after using
dulwich (pure python git implementation) to clone a template. Dulwich
itself has some decent logic for line endings that it borrows from git. But
for this case, I wonder if we can't do something as simple as detecting
what the original line endings are and respecting them.
On Wed, 13 Feb 2019 at 18:58, Philippe Ombredanne notifications@github.com
wrote:
@themanifold https://github.com/themanifold please go for it!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/audreyr/cookiecutter/issues/405#issuecomment-463322664,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AE7zEoVfuGpGlGNp8zrdSOPmWHYflVIxks5vNGBIgaJpZM4DrWMD
.
@pombredanne I've fixed it in this PR applying that @themanifold suggest. Is it solving your problems too?
@pombredanne @themanifold @franciscomoma Fixed in cookiecuter 2.0 by #1407
You are welcome to do test of this fix, via using current master branch.
Most helpful comment
@pombredanne I've fixed it in this PR applying that @themanifold suggest. Is it solving your problems too?