smogon / pokemon-showdown

Pokémon battle simulator.
https://pokemonshowdown.com
MIT License
4.74k stars 2.77k forks source link

Windows: EOL validation fails in working copy #1247

Closed Slayer95 closed 9 years ago

Slayer95 commented 9 years ago

In Windows, a fresh clone of the repository will yield "Invalid line break" errors when running npm test due to its usage of CRLF in the working copy (despite the index having only LF).

I have been trying to fix this adding a .gitattributes file and cloning again, but Windows/Git seems to keep converting line endings :|

Zarel commented 9 years ago

Maybe we should have the test accept CRLFs if the platform is Windows?

Slayer95 commented 9 years ago

Done in https://github.com/Zarel/Pokemon-Showdown/commit/81433658258faf018af048f395ec1bc1d2064daa

Zarel commented 9 years ago

That isn't an ideal solution, though...

Zarel commented 9 years ago

Might be better to force CRLF's in Windows?

Slayer95 commented 9 years ago

Wow, a few days ago I was thinking "it would be awesome if the os package had a feature to get EOL", and it turns out it does... I'll use it.