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
equality and math gt and lt checks (==, >, <) evaluate to false when they should evaluate to true
==
>
<
Version of yq: 4.42.1 Operating system: mac Installed via: homebrew
Input Yaml
data1.yml:
old_octal: 0644 # YAML 1.1 new_octal: 0o644 # YAML 1.2
Command
cat data1.yml | yq ' to_entries | [ .[] | with( . ; ._type = (.value | type) | .eq0644 = (.value == 0644) | .eq420 = (.value == 420) | .gt419 = (.value > 419) | .lt421 = (.value < 421) | .gt0643 = (.value > 0643) | .lt0645 = (.value < 0645) ) ]'
Actual behavior
- key: old_octal value: 0644 _type: '!!int' eq0644: true eq420: false gt419: true lt421: false gt0643: true lt0645: true - key: new_octal value: 0o644 _type: '!!int' eq0644: false eq420: false gt419: true lt421: true gt0643: false lt0645: true
Expected behavior
- key: old_octal value: 0644 _type: '!!int' eq0644: true eq420: true gt419: true lt421: true gt0643: true lt0645: true - key: new_octal value: 0o644 _type: '!!int' eq0644: true eq420: true gt419: true lt421: true gt0643: true lt0645: true
Additional information
probably connected - difference between YAML 1.1 and YAML 1.2 for octals when exporting to JSON:
command:
> cat data1.yml | yq -o json
output:
{ "old_octal": 644, "new_octal": 420 }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
equality and math gt and lt checks (
==
,>
,<
) evaluate to falsewhen they should evaluate to true
Version of yq: 4.42.1
Operating system: mac
Installed via: homebrew
Input Yaml
data1.yml:
Command
Actual behavior
Expected behavior
Additional information
probably connected - difference between YAML 1.1 and YAML 1.2 for octals when exporting to JSON:
command:
output:
The text was updated successfully, but these errors were encountered: