-
-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--from-file does not accept \r\n line separators on Windows #1860
Comments
Thanks for raising. The line ending issue is pretty straight forward to fix, and will be included in the next release. I'm having trouble with the UTF encoding - theres quite a few different UTF16 encoding standards, and I haven't found a decent go library that handles them properly. |
@mikefarah I'm not sure if I should be reporting this here, as it seems to be related to the CrLf handling, or if I should open a new issue for this.... Let me know if I need to move this to a new issue. Platform: Windows ---
# document 1 start comment
test:
sub:
key: value
---
# document 2 start comment
foo:
bar:
key: value Line Ending: CrLf
---
# document 1 start comment
test:
sub:
key: value
# document 2 start comment
---
foo:
bar:
key: value Note how the "document 2 start comment" has moved from the top of the second document to the bottom of the first document! This is causing havoc with the Kubernetes manifest that I'm manipulating with If I explicitly change the line endings of |
Hey, thanks for raising, this is a separate issue. I've created another card :) |
CRLF issue has been fixed in 4.40.2 |
Closing as the main issue has been fixed. Feel free to raise a separate issue for UTF coding if desired. |
Describe the bug
where
patch.yq
has Windows StyleCrLf
line endings.Also note that
yq
seems to be very sensitive of the Encoding of the file specified via--from-file
. It does not accept UTF-16 files (which my PowerShell produces by default), and it does not accept a UTF-8 file with BOM.Version of yq: 4.35.2
Operating system: Windows 10 22H2
Installed via: binary release
Command
The command you ran:
The text was updated successfully, but these errors were encountered: