Closed l0b0 closed 2 years ago
Hmm, I would have expected that the .editorconfig is there to avoid such things. Otherwise the .editorconfig seems pretty useless to me if the editor still adds \r\n instead of \n.
Also, we should add a CI test for this.
Will try to fix and re-release.
.editorconfig is working fine - the file in the repository doesn't have \r
. So it must be your release process that's changing the file. This is why I suggested automating releases.
Well, I'm on Windows so this doesn't come completely unexpected.
Trying to get a test for it, but can't reproduce the code snippet you gave above on Windows yet.
The addition of a .gitattributes file that enforces lf for /bin/cli.js should help, will release 1.2.2 shortly.
Looking at previous releases something changed in the release process between releases 1.1.0 and 1.2.0
grabbing the packaged tars from https://registry.npmjs.org/stac-node-validator/ for these two releases shows the \r
was added into the file
Nothing in the release process has changed (intentionally) on my side, the process I do is the same. Must be some tooling that has changed, but how shall I know that if whatever tool changes something in-between?!
v1.2.2 has been released, the line ending was lf during the release so that should work now. Additionally, I've added the .gitattributes file so that non-Linux users should always get the correct lf line ending after git checkout. Sorry for any inconvenience caused.
Fix confirmed, thanks!
To Reproduce Steps to reproduce the behavior:
Expected behavior
The command should run without issue.
Actual behavior
Additional context
The command works when installed with
npm
. Presumably it converts newlines at install time to avoid this.I could automate the release on merge to master if you add the relevant credentials to the repo secrets.
Discovered in this PR.