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

Delete does not work with deep splat #421

Closed
mook-as opened this issue Apr 21, 2020 · 1 comment
Closed

Delete does not work with deep splat #421

mook-as opened this issue Apr 21, 2020 · 1 comment
Labels
Milestone

Comments

@mook-as
Copy link

mook-as commented Apr 21, 2020

Describe the bug
When using deep splats with yq delete, it does not appear to delete paths that would be found by yq read.

Command
Reading works with deep splats:

$ echo '{a: {b: {c: 1 } } }' | yq r - '**.c'
1

But deleting does not:

$ echo '{a: {b: {c: 1 } } }' | yq d - '**.c'
{a: {b: {c: 1}}}

Expected behavior

$ echo '{a: {b: {c: 1 } } }' | yq d - 'a.b.c'
{a: {b: {}}}

Additional context
yq version 3.3.0 on Linux/amd64, binary freshly downloaded from releases page.

See also #175 which was about non-deep (shallow?) splats. That appears to work in this version.

@mook-as mook-as added the bug label Apr 21, 2020
@mikefarah
Copy link
Owner

Can replicate it, will fix in next release

@mikefarah mikefarah added this to the 3.3.1 milestone Apr 29, 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