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

keys unquoted during merge #363

Closed
hobti01 opened this issue Feb 17, 2020 · 1 comment
Closed

keys unquoted during merge #363

hobti01 opened this issue Feb 17, 2020 · 1 comment
Labels
Milestone

Comments

@hobti01
Copy link
Contributor

hobti01 commented Feb 17, 2020

With yq 3.1.1 we're noticing a change in behavior from yq v2. It's unexpected that the quoted key is parsed into an array.

$ rm -rf out.yaml ; touch out.yaml 
$ echo "'key[bracket]': value" > in.yaml
$ cat in.yaml 
'key[bracket]': value
$ yq merge -i out.yaml in.yaml
$ cat out.yaml 
key:
  bracket: value

we expect the behavior of yq v2

$ echo 'cannot: merge-empty' > out.yaml
$ echo "'key[bracket]': value" > in.yaml
$ cat in.yaml 
'key[bracket]': value
$ yq merge -i out.yaml in.yaml
$ cat out.yaml
cannot: merge-empty
'key[bracket]': value

How can we accomplish this in yq v3?

Similar to #345 but for brackets.

@mikefarah mikefarah added the bug label Feb 17, 2020
@mikefarah mikefarah added this to the 3.1.2 milestone Feb 18, 2020
@mikefarah
Copy link
Owner

Fixed in https://github.com/mikefarah/yq/releases/tag/3.1.2

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