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
Use shx tool to make linux-specific calls cross platform
Run prettier check only as part of the Linux-based GitHub action and not as part of tests
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 ranprettier -- check
in some subpackages. In windows git automatically converts linux'sLF
line endings into Windows'CRLF
when pulling files. It works generally, because git also converts them back to the linux'sLF
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 ranprettier check
on running. And the command fails on windows as it noticesCRLF
line endings which are not allowed.Solution
npm ci
instead ofnpm install
in the windows GitHub actions (related to https://github.com/aws/language-servers/pull/317)License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.