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

Variable assignment breaks doc splitting #2118

Open
Angivare opened this issue Jul 30, 2024 · 0 comments
Open

Variable assignment breaks doc splitting #2118

Angivare opened this issue Jul 30, 2024 · 0 comments
Labels

Comments

@Angivare
Copy link

Describe the bug

split_doc does not split documents anymore after a variable assignment.

Version of yq: 4.44.2
Operating system: Linux (WSL)
Installed via: binary release

Input Yaml
Concise yaml document(s) (as simple as possible to show the bug, please keep it to 10 lines or less)
data1.yml:

[1, 2]

Command
The command you ran:

echo '[1, 2]' | yq '.[] | . as $_ | split_doc'

Actual behavior

1
2

Expected behavior

1
---
2

Additional context

The ran command should really be equivalent to

echo '[1, 2]' | yq '.[] | split_doc'

which does give the expected output.

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

1 participant