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 Encoding to yaml only encodes the first document to a string
Note that any how to questions should be posted in the discussion board and not raised as an issue.
Version of yq: 4.42.1 Operating system: osx or linux Installed via: homebrew and manual build
Input Yaml
foo.yml:
build: no data: test.yaml: | a: b type: plain --- c: d type: juicy --- e: f type: greenish
Command The command you ran:
yq '.data."test.yaml" = (.data."test.yaml" | from_yaml | select(.type == "juicy").c = "DD" | to_yaml)' foo.yaml
Actual behavior
build: no data: test.yaml: | a: b type: plain
Expected behavior
build: no data: test.yaml: | a: b type: plain --- c: DD type: juicy --- e: f type: greenish
Additional context
I get the same result for this:
export manifests=$(yq '.data."test.yaml"' foo.yaml | yq 'select(.type == "juicy").c = "DD"') yq '.data."test.yaml" = env(manifests)' foo.yaml
this works as expected
yq '.data."test.yaml"' foo.yaml | yq 'select(.type == "juicy").c = "DD" | to_yaml'
The text was updated successfully, but these errors were encountered:
4.44.1 has same issue on osx
Sorry, something went wrong.
Verified - needs fix
No branches or pull requests
Describe the bug
Encoding to yaml only encodes the first document to a string
Note that any how to questions should be posted in the discussion board and not raised as an issue.
Version of yq: 4.42.1
Operating system: osx or linux
Installed via: homebrew and manual build
Input Yaml
foo.yml:
Command
The command you ran:
Actual behavior
Expected behavior
Additional context
I get the same result for this:
this works as expected
The text was updated successfully, but these errors were encountered: