Skip to content
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

yq merge panics if comments contains Unicode #446

Closed
lingsamuel opened this issue May 28, 2020 · 5 comments
Closed

yq merge panics if comments contains Unicode #446

lingsamuel opened this issue May 28, 2020 · 5 comments
Labels
Milestone

Comments

@lingsamuel
Copy link

lingsamuel commented May 28, 2020

Describe the bug
When the comment contains Unicode such as Chinese, yq merge will panic.

Input Yaml
Minimal test yamls below:

a.yaml:

a: work

b.yaml:

中文: work

c.yaml:

c: error # 中文

d.yaml

d: 中文

Command

yq merge a.yaml b.yaml # Okay
yq merge a.yaml c.yaml # Panic!
yq merge a.yaml d.yaml # Okay
yq merge b.yaml d.yaml # Okay

Actual behavior

image

From the stack trace, maybe it's not a yq bug but a yaml.v3 bug.

Expected behavior

Comments with Unicode should work.

Additional context

yq version:
image

@lingsamuel lingsamuel added the bug label May 28, 2020
@lingsamuel
Copy link
Author

yaml.v3 bug: go-yaml/yaml#538
It's closed but still exists...

@mikefarah
Copy link
Owner

Yeah I'm hoping someone on that project will pick it up :(

@lingsamuel
Copy link
Author

go-yaml/yaml#538 (comment)
I think the fix will fly soon.

@lingsamuel
Copy link
Author

lingsamuel commented Jun 2, 2020

Hello, yaml.v3 fixed this issue: go-yaml/yaml#538 (comment).

@mikefarah
Copy link
Owner

yup - next release will have that fix!

@mikefarah mikefarah added this to the 3.3.1 milestone Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants