Closed dmihalcik-virtru closed 4 days ago
jq 1.7.1 is fine with the .[] syntax but not version 1.6, which the version in the current ubuntu GitHub action runner.
.[]
Tested via running
> docker run -it --rm -v $(pwd)/:/project debian /bin/bash > apt-get update > apt-get install curl > curl -L -o /usr/bin/jq https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 > chmod +x /usr/bin/jq > apt-get install golang > cd project/sdk > x=lib/fixtures > export pkg=github.com/opentdf/platform/${x} > go mod edit --json | jq -e '.Replace.[] | select(.Old.Path == env.pkg)' jq: error: syntax error, unexpected '[', expecting FORMAT or QQSTRING_START (Unix shell quoting issues?) at <top-level>, line 1: .Replace.[] | select(.Old.Path == env.pkg) jq: 1 compile error > go mod edit --json | jq -e '.Replace[] | select(.Old.Path == env.pkg)' jq: error (at <stdin>:399): Cannot iterate over null (null) > go mod edit --json | jq -e '.Require.[] | select(.Path == env.pkg)' jq: error: syntax error, unexpected '[', expecting FORMAT or QQSTRING_START (Unix shell quoting issues?) at <top-level>, line 1: .Require.[] | select(.Path == env.pkg) jq: 1 compile error > go mod edit --json | jq -e '.Require[] | select(.Path == env.pkg)' { "Path": "github.com/opentdf/platform/lib/fixtures", "Version": "v0.2.5" }
jq 1.7.1 is fine with the
.[]
syntax but not version 1.6, which the version in the current ubuntu GitHub action runner.Tested via running