Bug 2017285
| Summary: | jq try/catch stops iteration over items | |||
|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | WRH <wil.rh> | |
| Component: | jq | Assignee: | Haïkel Guémar <karlthered> | |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 34 | CC: | bhills, davide, david, fpercoco, karlthered, lhh, thalman | |
| Target Milestone: | --- | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | jq-1.6-13.fc37 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2049594 2049601 (view as bug list) | Environment: | ||
| Last Closed: | 2022-03-11 18:56:06 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 2045178, 2049594, 2049601 | |||
|
Description
WRH
2021-10-26 08:30:34 UTC
This issue has been introduced in commit https://github.com/stedolan/jq/commit/cf4b48c7ba30cb30e116b523cff036ea481459f It is not fixed upstream yet. In fact `jq` does not stop iterrating, it just stops converting and printing strings
jq '.[]| tonumber? ' <<< '["1", "a", "2", 3]'
will print 1 and 3 because 3 is not converted from string.
Here is the PR to discuss and find the fix: https://github.com/stedolan/jq/pull/2400
Tom
The issue can be also avoided by providing `--disable-decnum` configure option HTH T. I've put up https://src.fedoraproject.org/rpms/jq/pull-request/5 to address this. FEDORA-2022-4e51f14539 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-4e51f14539 FEDORA-2022-4e51f14539 has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report. |