We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Looping over an empty object still returns a list of elements somehow.
Version of yq: 4.33.1 Operating system: mac Installed via: homebrew
4.33.1
mac
homebrew
Input Yaml meh.yml:
other: thing labels: {}
Command The command you ran:
yq '.labels[] | select(tag != "!!str") | ">" + key + "< " + (key | line) + " " + tag' meh.yaml
Actual behavior
Consistently outputs 0 as the line number. The key is the empty string. This doesn't change even when labels is much lower down in the file.
0
line
key
labels
>< 0 !!null
Expected behavior
# no output
The text was updated successfully, but these errors were encountered:
@mikefarah Bump.
Any ideas about this one?
Sorry, something went wrong.
Sorry - dropped off my brain. Yep that's a bug, fill fix next release
Fixed bug when splatting empty array #1613
a389bb6
Fixed in 4.33.3
No branches or pull requests
Describe the bug
Looping over an empty object still returns a list of elements somehow.
Version of yq:
4.33.1
Operating system:
mac
Installed via:
homebrew
Input Yaml
meh.yml:
Command
The command you ran:
yq '.labels[] | select(tag != "!!str") | ">" + key + "< " + (key | line) + " " + tag' meh.yaml
Actual behavior
Consistently outputs
0
as theline
number. Thekey
is the empty string. This doesn't change even whenlabels
is much lower down in the file.>< 0 !!null
Expected behavior
# no output
The text was updated successfully, but these errors were encountered: