aws / language-servers

AWS related Language Servers
Apache License 2.0
25 stars 19 forks source link

Fixing Windows problems - prettier CRLF and linux cp tool #321

Closed imykhai closed 4 months ago

imykhai commented 4 months ago

Problem

The package fails builds on Windows. One of the reason is that we have cp in our npm scripts which only works on linux. Another problem was that we ran prettier -- check in some subpackages. In windows git automatically converts linux's LF line endings into Windows' CRLF when pulling files. It works generally, because git also converts them back to the linux's LF before staging or committing the files. And our husky git hooks also run prettier before committing so that prettier will convert the line endings to linux's LF even if git wouldn't. But it all breaks because we had npm script that ran prettier check on running. And the command fails on windows as it notices CRLF line endings which are not allowed.

Solution

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.