You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a centos environment, the jq binary installed from dnf does not work in the same way as the one downloaded directly from github 1.6 releases page
To Reproduce
ℹ️ the dockerfile used is at the end of this issue.
user@laptop:~/$ podman run rootmout/debub-jq-parsing-error-in-centos:v1.0.0 cat entry_file.txt
I am not a jsonee line
{"code":200,"message":"I am a json line","stack":"","level":"info"}
user@laptop:~/$ podman run rootmout/debub-jq-parsing-error-in-centos:v1.0.0 jq --version
jq-1.6
user@laptop:~/$ podman run rootmout/debub-jq-parsing-error-in-centos:v1.0.0 jq -R 'fromjson' entry_file.txt
jq: error (at entry_file.txt:1): Invalid numeric literal at line 1, column 2 (while parsing 'I am not a jsonee line')
jq: error (at entry_file.txt:2): Invalid numeric literal at line 1, column 12 (while parsing '{"code":200,"message":"I am a json line","stack":"","level":"info"}')
user@laptop:~/$ podman run rootmout/debub-jq-parsing-error-in-centos:v1.0.0 ./jq-linux64 --version
jq-1.6
user@laptop:~/$ podman run rootmout/debub-jq-parsing-error-in-centos:v1.0.0 ./jq-linux64 -R 'fromjson' entry_file.txt
jq: error (at entry_file.txt:1): Invalid numeric literal at line 1, column 2 (while parsing 'I am not a jsonee line')
{
"code": 200,
"message": "I am a json line",
"stack": "",
"level": "info"
}
rootmout/debub-jq-parsing-error-in-centos:v1.0.0 contain the binary jq installed by dnf and the ./jq-linux64 installed with wget from github, both are in version 1.6 and use the same file as entry but one installed by dnf fail with a parsing error while other is working fine.
Expected behavior
Both binary should work the same way.
Environment (please complete the following information):
OS and Version: CentOS Stream release 8
jq version: 1.6
Additional doc
Dockerfile used to create debub-jq-parsing-error-in-centos:v1.0.0 image used in "To Reproduce" section:
FROM quay.io/centos/centos:stream8
RUN dnf -y update -d 10 && \
dnf -y --nodocs install wget vim jq && \
dnf clean all
RUN wget https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
RUN chmod +x jq-linux64
RUN echo -e \
'I am not a json line\n{"code":200,"message":"I am a json line","stack":"","level":"info"}' \
> entry_file.txt
The text was updated successfully, but these errors were encountered:
Describe the bug
In a centos environment, the
jq
binary installed from dnf does not work in the same way as the one downloaded directly from github 1.6 releases pageTo Reproduce
ℹ️ the dockerfile used is at the end of this issue.
rootmout/debub-jq-parsing-error-in-centos:v1.0.0
contain the binaryjq
installed by dnf and the./jq-linux64
installed with wget from github, both are in version 1.6 and use the same file as entry but one installed by dnf fail with a parsing error while other is working fine.Expected behavior
Both binary should work the same way.
Environment (please complete the following information):
Additional doc
Dockerfile used to create
debub-jq-parsing-error-in-centos:v1.0.0
image used in "To Reproduce" section:The text was updated successfully, but these errors were encountered: