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

Duplicate keys are not reported as errors #2228

Open
dyj216 opened this issue Dec 12, 2024 · 0 comments
Open

Duplicate keys are not reported as errors #2228

dyj216 opened this issue Dec 12, 2024 · 0 comments
Labels

Comments

@dyj216
Copy link

dyj216 commented Dec 12, 2024

Describe the bug
The validation of a yaml file doesn't report duplicates.

Version of yq: 4.44.5
Operating system: linux.
Installed via: docker and installed binary (from arch repo)

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

duplicateKey: true
duplicateKey: false

Command
The command you ran:

yq 'true' data1.yml > /dev/null

Actual behavior

# there is no output generated

Expected behavior

# command output in shell is something similar:
Map keys must be unique at line 2, column 1
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