Describe the bug
During a gh pr list with jq filtering, any empty array passed to the unique operator outputs null.
$ gh --version
gh version 2.4.0+dfsg1 (2022-03-23 Ubuntu 2.4.0+dfsg1-2)
https://github.com/cli/cli/releases/latest
Steps to reproduce the behavior
gh pr list --json title -q '[] | unique'
- Observe that the output is
null
Expected vs actual behavior
Expected output is the empty array ([]). Instead, null is produced.
Logs
$ gh pr list --json title -q '[] | unique'
null
Describe the bug
During a
gh pr listwith jq filtering, any empty array passed to theuniqueoperator outputs null.Steps to reproduce the behavior
gh pr list --json title -q '[] | unique'nullExpected vs actual behavior
Expected output is the empty array (
[]). Instead,nullis produced.Logs